Closed
Bug 1455422
(async-blob)
Opened 7 years ago
Closed 7 years ago
Make blob rendering not block the render thread.
Categories
(Core :: Graphics: WebRender, enhancement, P1)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: nical)
References
Details
Attachments
(1 file, 4 obsolete files)
I recall Nical thinking this would be easy.
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → nical.bugzilla
Reporter | ||
Updated•7 years ago
|
Priority: -- → P1
Updated•7 years ago
|
Blocks: stage-wr-trains
Updated•7 years ago
|
Alias: async-blob
Reporter | ||
Updated•7 years ago
|
Blocks: stage-wr-nightly
Assignee | ||
Comment 1•7 years ago
|
||
This is the Gecko side of things, most of the work being in https://github.com/servo/webrender/pull/2785
It doesn't currently work: WebRender sometimes to requests tiles outside of the area generated by intersecting the viewport and the image display item so I guess something is wrong in the way I am trying to generate this visible rect. Might be that I can't assume that the reference frame of the first display item is enough, might be something else, not sure yet.
Assignee | ||
Comment 2•7 years ago
|
||
Another version that uses the wrapping display item's paint rect thanks to mstange's help.
Comment hidden (typo) |
Assignee | ||
Comment 4•7 years ago
|
||
Oh boy what did I just do?
Assignee | ||
Comment 5•7 years ago
|
||
I tried to use the intersection of the bounds and paint rect of the blob image display items to apply a local clip on the display item. This helps a lot with preventing webrender from requesting tiles that are not in Gecko's computed visible area, but it appears to cause some issues. The main one I saw was the animated map at the bottom of http://digitalocean.com/ rendering very differently.
Attachment #8989414 -
Attachment is obsolete: true
Assignee | ||
Comment 6•7 years ago
|
||
Try push is (almost surprisingly) green https://treeherder.mozilla.org/#/jobs?repo=try&revision=a4c648a8899b053966f116bb2db9e0a6e0de95bf
Assignee | ||
Comment 7•7 years ago
|
||
Up to date patch that is in this try push https://treeherder.mozilla.org/#/jobs?repo=try&revision=a167b8873fba6c7b9a6802b88b6046d6580686c3
Attachment #8989932 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8992648 -
Flags: review?(jmuizelaar)
Attachment #8992648 -
Flags: review?(bugmail)
Attachment #8992648 -
Flags: review?(a.beingessner)
Reporter | ||
Comment 8•7 years ago
|
||
Comment on attachment 8992648 [details] [diff] [review]
Implement the new async blob handler/rasterizer API.
Review of attachment 8992648 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ +69,5 @@
> + const LayoutDeviceRect& aImageRect,
> + const LayoutDeviceRect& aPaintRect)
> +{
> + LayoutDeviceRect visibleRect = aImageRect.Intersect(aPaintRect);
> + // Send the visible rect in normalized coordinates.
I'd prefer to not use normalized coordinates and instead use integer device pixels
Attachment #8992648 -
Flags: review?(jmuizelaar) → review+
Updated•7 years ago
|
Attachment #8992648 -
Flags: review?(bugmail) → review+
Comment 9•7 years ago
|
||
Comment on attachment 8992648 [details] [diff] [review]
Implement the new async blob handler/rasterizer API.
Review of attachment 8992648 [details] [diff] [review]:
-----------------------------------------------------------------
There's too many kinds of visible rect for me to be certain that part is right, so mostly just reviewing the piping and stuff assuming that's right.
::: gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ +1164,5 @@
> group.mGroupBounds = groupBounds;
> + group.mPaintRect = LayoutDeviceRect::FromAppUnits(
> + aWrappingItem->GetPaintRect(),
> + appUnitsPerDevPixel
> + );
should you also pipe this value through at https://searchfox.org/mozilla-central/source/gfx/layers/wr/WebRenderCommandBuilder.cpp#979
?
::: gfx/webrender_bindings/src/moz2d_renderer.rs
@@ +432,5 @@
> + unsafe { DeleteFontData(font); }
> + }
> +
> + fn delete_font_instance(&mut self, _key: FontInstanceKey) {
> + }
can you explain (comment?) why this is blank?
Attachment #8992648 -
Flags: review?(jmuizelaar)
Attachment #8992648 -
Flags: review?(bugmail)
Attachment #8992648 -
Flags: review?(a.beingessner)
Attachment #8992648 -
Flags: review+
Assignee | ||
Comment 10•7 years ago
|
||
Comment on attachment 8992648 [details] [diff] [review]
Implement the new async blob handler/rasterizer API.
Review of attachment 8992648 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ +1164,5 @@
> group.mGroupBounds = groupBounds;
> + group.mPaintRect = LayoutDeviceRect::FromAppUnits(
> + aWrappingItem->GetPaintRect(),
> + appUnitsPerDevPixel
> + );
Yeah I think so.
::: gfx/webrender_bindings/src/moz2d_renderer.rs
@@ +432,5 @@
> + unsafe { DeleteFontData(font); }
> + }
> +
> + fn delete_font_instance(&mut self, _key: FontInstanceKey) {
> + }
I can't explain it but this function already existed and was already blank before this patch.
Comment 11•7 years ago
|
||
Comment on attachment 8992648 [details] [diff] [review]
Implement the new async blob handler/rasterizer API.
Review of attachment 8992648 [details] [diff] [review]:
-----------------------------------------------------------------
Looks like some flags got reset. Restoring them
Attachment #8992648 -
Flags: review?(jmuizelaar)
Attachment #8992648 -
Flags: review?(bugmail)
Attachment #8992648 -
Flags: review+
Assignee | ||
Comment 12•7 years ago
|
||
Same patch with Alexi's comment addressed and a proper commit title.
Attachment #8992648 -
Attachment is obsolete: true
Updated•7 years ago
|
Attachment #8993009 -
Attachment is patch: true
Comment 13•7 years ago
|
||
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/80efe717b563
Implement the new blob image rasterization hooks. r=kats, gankro
Comment 14•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•