Closed Bug 1391841 Opened 7 years ago Closed 7 years ago

Clip fallback display items using WebRender clips instead of doing the clip internally

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file)

https://bugzilla.mozilla.org/show_bug.cgi?id=1377571#c15 "It would be nice if we could always paint the entire item into the blob (and have the blob image's bounds be the whole, unclipped item), and then apply the clip on the outside."
This gives a huge performance improvement when scrolling mozilla.org However, it can cause us to make very big display items. This should be resolved with the tiling support from bug 1387550.
Attachment #8899137 - Flags: review?(ethlin)
Comment on attachment 8899137 [details] [diff] [review] Do fallback display item clipping with webrender. r=ethlin Review of attachment 8899137 [details] [diff] [review]: ----------------------------------------------------------------- The reason of using clippedBounds was because some large display items could cause crash. Some of the display items are really too large. I'm not sure how the tiled blob image works, but we probably should skip painting the tiles those are out of screen. I'm also worried that the change may cause some try server failures in layers-free mode while the blob image is off by default and I'm trying to turn on layers-free. How about just doing the clipping for non-blobimage? e.g.: if (!gfxPrefs::WebRenderBlobImages() && clip.HasClip()) { clippedBounds = itemBounds.Intersect(clip.GetClipRect()); } ::: gfx/layers/wr/WebRenderLayerManager.cpp @@ +434,2 @@ > aOffset = ViewAs<LayerPixel>( > + LayoutDevicePoint::FromAppUnits(aItem->ToReferenceFrame(), appUnitsPerDevPixel), I fixed a position problem. So the latest code is "LayoutDevicePoint::FromAppUnits(clippedBounds.TopLeft(), appUnitsPerDevPixel)". I think for this patch we should use itemBounds.TopLeft() here.
Attachment #8899137 - Flags: review?(ethlin) → review+
Pushed by jmuizelaar@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/dfade36563b4 Clip fallback display items using WebRender clips instead of doing the clip internally. r=ethlin
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Assignee: nobody → jmuizelaar
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: