Closed Bug 1599965 Opened 3 months ago Closed 3 months ago

Improve how dirty image detection works in webrender

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: gw, Assigned: gw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → gwatson
  • The existing code to detect if an image is dirty fails in some
    cases. For external images, they were not being added to the
    list of dirty images when update was called. Further, since
    the dirty image keys hash set was cleared each frame, it was
    possible for an image to become dirty, but this detection to be
    missed if it is not queried until a subsequent frame (due to
    it being off-screen.

    Instead, each image template has a generation identifier that
    is incremented whenever an image template is updated. The picture
    caching code stores the generation of the image key when it was
    rasterized, and compares that to the current image key generation
    when comparing dependencies. This fixes both cases above.

  • Remove the is_cacheable logic that was previously used to
    invalidate picture cache tiles for external images. This would
    result in picture cache images that intersect with videos being
    invalidated every frame unconditionally. However, this code path
    is no longer required, due to the change above. By relying on
    the true image dirty check, we can skip invalidating tiles
    affected by video if the video frame has not advanced (e.g. it
    is paused, or advancing at a lower frame rate than we are
    currently compositing at).

Blocks: 1536360
Blocks: 1595437
Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93ccc760c4dd
Improve how dirty image detection works in webrender. r=nical
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla73 → ---
Backout by shindli@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/7205934173a4
Backed out changeset 93ccc760c4dd for causing wrench bustage on central CLOSED TREE a=backout

I don't understand how that failure is caused by this patch - it seems like some kind of compile error in a dependency that is unrelated to this change? It also passed on a try run on that configuration.

I'll take a closer look tomorrow and see if I can work out what's going on.

(this is the try run with this patch which seems to pass on that failing wrench platform - https://treeherder.mozilla.org/#/jobs?repo=try&revision=05d9b43469e8f6d0d9acc04b60f305f8392b3202&selectedJob=278974255)

I suspect the problem may actually be caused by / related to https://bugzilla.mozilla.org/show_bug.cgi?id=1595218 which landed recently?

Pushed by shindli@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/f19ecba85c93
Improve how dirty image detection works in webrender. r=nical
Status: REOPENED → RESOLVED
Closed: 3 months ago3 months ago
Flags: needinfo?(gwatson)
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.