Closed
Bug 1351242
Opened 7 years ago
Closed 7 years ago
Add wr support for nsDisplayBackgroundImage image type
Categories
(Core :: Graphics: WebRender, enhancement)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: ethlin, Assigned: ethlin)
References
Details
Attachments
(1 file)
21.04 KB,
patch
|
mchang
:
review+
|
Details | Diff | Splinter Review |
Bug 1341101 handle the gradient type for nsDisplayBackgroundImage. This bug is for image type.
Assignee | ||
Comment 1•7 years ago
|
||
WR doesn't support sub-image, so the display will be wrong if the background-position is not zero. I think we should push sub-image to WR for this case. I will create another bug for it.
Attachment #8855180 -
Flags: review?(mchang)
Comment 2•7 years ago
|
||
Comment on attachment 8855180 [details] [diff] [review] add wr for background image type Review of attachment 8855180 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/painting/nsImageRenderer.cpp @@ +616,5 @@ > + case eStyleImageType_Image: > + { > + RefPtr<layers::ImageContainer> container = mImageContainer->GetImageContainer(aLayer->WrManager(), > + ConvertImageRendererToDrawFlags(mFlags)); > + if (!container) { probably for now, we can add debug warnings that the container or external image container don't work.
Attachment #8855180 -
Flags: review?(mchang) → review+
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Mason Chang [:mchang] from comment #2) > Comment on attachment 8855180 [details] [diff] [review] > add wr for background image type > > Review of attachment 8855180 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: layout/painting/nsImageRenderer.cpp > @@ +616,5 @@ > > + case eStyleImageType_Image: > > + { > > + RefPtr<layers::ImageContainer> container = mImageContainer->GetImageContainer(aLayer->WrManager(), > > + ConvertImageRendererToDrawFlags(mFlags)); > > + if (!container) { > > probably for now, we can add debug warnings that the container or external > image container don't work. Okay, I will add NS_WARNING here.
Assignee | ||
Comment 4•7 years ago
|
||
try result looks good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bc548a096602d07497e9cf76d5da0b54a6a45f94
Pushed by ethlin@mozilla.com: https://hg.mozilla.org/projects/graphics/rev/cff3cf898836 Add webrender support for nsDisplayBackgroundImage image type. r=mchang
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 6•7 years ago
|
||
This is great and seems to be the most impactful display item type for WR. From what I'm seeing, we often hit the this path [1] then this fast path [2]. Any idea what work needs to be done here to turn this on by default? Thanks! [1] http://searchfox.org/mozilla-central/source/layout/painting/nsImageRenderer.cpp#515 [2] http://searchfox.org/mozilla-central/source/layout/base/nsLayoutUtils.cpp#6809
Flags: needinfo?(ethlin)
Assignee | ||
Comment 7•7 years ago
|
||
So far as I know, the background-position support should be necessary and I'll work on this. I suppose there will be some clipping/masking problems. We can have more discussions in bug 1359242.
Flags: needinfo?(ethlin)
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cff3cf898836
Updated•7 years ago
|
status-firefox55:
--- → fixed
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•