Closed Bug 1599965 Opened 2 years ago Closed 2 years ago

Improve how dirty image detection works in webrender


(Core :: Graphics: WebRender, enhancement)

Not set



Tracking Status
firefox73 --- fixed


(Reporter: gw, Assigned: gw)


(Blocks 1 open bug)



(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
Improve how dirty image detection works in webrender. r=nical
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Resolution: FIXED → ---
Target Milestone: mozilla73 → ---
Backout by
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 -

I suspect the problem may actually be caused by / related to which landed recently?

Pushed by
Improve how dirty image detection works in webrender. r=nical
Closed: 2 years ago2 years ago
Flags: needinfo?(gwatson)
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Regressions: 1601926
Regressions: 1624988
Regressions: 1627816
You need to log in before you can comment on or make changes to this bug.