Closed Bug 1570081 Opened 5 years ago Closed 5 years ago

Support changing the bounds of blob image visible rects.

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: nical, Assigned: nical)

References

Details

Attachments

(8 files, 6 obsolete files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
13.68 KB, patch
Details | Diff | Splinter Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

WebRrender-side changes needed for the blob-image recoordination work.

Attached file Bug 1570081 - [WIP] fixes (obsolete) —
Attachment #9081703 - Attachment is obsolete: true
Attachment #9083366 - Attachment description: Bug 1570081 - Fix the calculation of the blob render rect for tile blobs when there is only one tile, it is smaller than the tile size and it is aligned with the tiling origin. → Bug 1570081 - Remove assumptions in blob tiling code about single tile offsets.

Depends on D40826

Depends on D41387

Depends on D41388

Attachment #9081705 - Attachment description: Bug 1570081 - Handle top and left partial blob tiles. → Bug 1570081 - Support changing the blob image visible rect in WebRender. r=jrmuizel
Attachment #9084315 - Attachment description: Bug 1570081 - Fix the very_large_blob rawtest. → Bug 1570081 - Fix the very_large_blob rawtest. r=jrmuizel
Attachment #9084317 - Attachment description: Bug 1570081 - Update reftests. → Bug 1570081 - Update reftests. r=jrmuizel
Attachment #9081704 - Attachment is obsolete: true
Attachment #9081971 - Attachment is obsolete: true
Attachment #9083366 - Attachment is obsolete: true
Attachment #9084316 - Attachment is obsolete: true

Quick note about the invalidation issue. I don't know how this works but it looks like in WebRenderCommandsBuilder.cpp we invalidate more than we need to. While scrolling a large SVG we hit this call to InvalidateRect: https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/gfx/layers/wr/WebRenderCommandBuilder.cpp#545 and I suspect that here (and in other places?) we don't want to use the full clipped image bounds and instead some thing that would be the intersection of the the clipped image bounds before and after scrolling.
Commenting out that line causes the blob to never update (because we don't update mValidRect at all during scrolling) so we get empty tiles past the initial visible area.

(In reply to Nicolas Silva [:nical] from comment #11)

Quick note about the invalidation issue. I don't know how this works but it looks like in WebRenderCommandsBuilder.cpp we invalidate more than we need to. While scrolling a large SVG we hit this call to InvalidateRect: https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/gfx/layers/wr/WebRenderCommandBuilder.cpp#545 and I suspect that here (and in other places?) we don't want to use the full clipped image bounds and instead some thing that would be the intersection of the the clipped image bounds before and after scrolling.
Commenting out that line causes the blob to never update (because we don't update mValidRect at all during scrolling) so we get empty tiles past the initial visible area.

Indeed. I'll investigate today.

So a piece that I forgot about that we'll need, is to make sure our invalid rect is intersected appropriately.

Today we intersect the invalid rect with the bounds of blob image image, but instead we need to intersect it with the intersection of the old bounds and the new bounds because that's only area that it makes sense to invalidate. Does that make sense? I'll try to put together a patch for it.

I haven't even tried to build this, but it should roughly do what we want here.

Some notable changes:

  • mImageBounds changes to be the an un-unit-ed mLayerBounds instead of the visibleRect. This should reduce some unnecessary invalidation
  • we don't intersect with mClippedGroupBounds. We shouldn't need to anymore because the visible area should already be tight
  • add a mLastVisibleRect that tracks the previous visible rect
  • we store a mPreservedRect which is the intersection between the current visiblerect and the last one
  • all calls to InvalidateRect are intersected with mPreservedRect

Possible areas of trouble:

  • new blob images don't have an invalid rect the size of the whole image. Instead it will be empty.
  • obsolete assertions might trigger.
Attachment #9084315 - Attachment description: Bug 1570081 - Fix the very_large_blob rawtest. r=jrmuizel → Bug 1570081 - Wrench rawtest changes. r=jrmuizel
Depends on: 1568227
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/afa98bb10628
Fix a number of issues with the tile decomposition code. r=jrmuizel
Keywords: leave-open
Attachment #9092371 - Attachment is obsolete: true
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/548e4395ee1a
Support changing the blob image visible rect in WebRender. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/214c815015a8
Wrench rawtest changes. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/ba19640abf33
Update reftests. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/14a4451b2781
Don't insert blob images with empty visible rects. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/8d4baf4d063a
Put the blob dirty rect in the same space as the drawing commands and visible rect. r=jrmuizel
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(nical.bugzilla)
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/32951c9cc186
Support changing the blob image visible rect in WebRender. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/775c0840f9cb
Wrench rawtest changes. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/aac21319b917
Update reftests. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/aeeb928c954f
Don't insert blob images with empty visible rects. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/e906f82ffa90
Put the blob dirty rect in the same space as the drawing commands and visible rect. r=jrmuizel

The patch could not be landed:
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. applying /tmp/tmpgkppmL layout/reftests/border-image/reftest.list Hunk #1 FAILED at 48. 1 out of 1 hunk FAILED -- saving rejects to file layout/reftests/border-image/reftest.list.rej abort: patch command failed: exited with status 256

Attachment #9093273 - Attachment description: Bug 1570081 - Adjust a reftest. r=jnicol → Bug 1570081 - Adjust a reftest. r=jnicol,aosmond
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0aa2e90830bd
Adjust a reftest. r=jnicol,aosmond
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: