Closed Bug 1330945 Opened 8 years ago Closed 8 years ago

Support opacity value in WebRenderContainerLayer

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54

People

(Reporter: ethlin, Assigned: ethlin)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

We don't use opacity value in the WebRenderContainerLayer for now. It will make some reftests failed. We should handle it.
Per bug 1322504 comment 48, we should remove random-if for the three tests [1] in this bug. [1] layout/reftests/bugs/581317-1.html , layout/reftests/bugs/650228-1.html, layout/reftests/bugs/728983-1.html
Jeff, I want to pass the containerLayer's opacity value to webrender to make the display correct. I can create a mask layer with the opacity value for WR but it's not efficient. So originally I want to add a parameter 'opacity' for wr_dp_push_stacking_context() and make it work. Does WR support other ways to set the group opacity?
Flags: needinfo?(jmuizelaar)
Yes. It looks like this should use an Opacity filter on the stacking context.
Flags: needinfo?(jmuizelaar)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #3) > Yes. It looks like this should use an Opacity filter on the stacking context. Jeff, There is a issue about group opacity performance[1]. If I want to add opacity filter for stacking context, should I do that in issue/422 or open another issue? [1] https://github.com/servo/webrender/issues/442
Flags: needinfo?(jmuizelaar)
(In reply to Ethan Lin[:ethlin] from comment #4) > (In reply to Jeff Muizelaar [:jrmuizel] from comment #3) > > Yes. It looks like this should use an Opacity filter on the stacking context. > > Jeff, > There is a issue about group opacity performance[1]. If I want to add > opacity filter for stacking context, should I do that in issue/422 or open > another issue? > > [1] https://github.com/servo/webrender/issues/442 Stacking contexts already support an opacity filter so there shouldn't be any webrender work needed here. #442 describes a worst case performance situation. I don't think we need to worry about it here.
Flags: needinfo?(jmuizelaar)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #5) > (In reply to Ethan Lin[:ethlin] from comment #4) > > (In reply to Jeff Muizelaar [:jrmuizel] from comment #3) > > > Yes. It looks like this should use an Opacity filter on the stacking context. > > > > Jeff, > > There is a issue about group opacity performance[1]. If I want to add > > opacity filter for stacking context, should I do that in issue/422 or open > > another issue? > > > > [1] https://github.com/servo/webrender/issues/442 > > Stacking contexts already support an opacity filter so there shouldn't be > any webrender work needed here. > > #442 describes a worst case performance situation. I don't think we need to > worry about it here. Oh...I got it! I didn't notice that parameter.
Use opacity filter in webrender.
Attachment #8829780 - Flags: review?(jmuizelaar)
Attached patch Part2. Change reftest flags. (deleted) — Splinter Review
Remove some fails-if and random-if flags and add fails-if for opacity-preserve3d-1.html which has wrong display originally.
Attachment #8829783 - Flags: review?(jmuizelaar)
I uploaded a wrong patch. This should be correct.
Attachment #8829780 - Attachment is obsolete: true
Attachment #8829780 - Flags: review?(jmuizelaar)
Attachment #8829786 - Flags: review?(jmuizelaar)
Attachment #8829786 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8829783 [details] [diff] [review] Part2. Change reftest flags. Review of attachment 8829783 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/reftests/transform-3d/reftest.list @@ +72,5 @@ > fuzzy-if(cocoaWidget,128,9) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac > fuzzy-if(cocoaWidget,128,9) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac > fails-if(webrender) == animate-backface-hidden.html about:blank > fails-if(webrender) == 1245450-1.html green-rect.html > +fuzzy(1,2000) fails-if == opacity-preserve3d-1.html opacity-preserve3d-1-ref.html This should probably be fails-if(webrender)
Attachment #8829783 - Flags: review?(jmuizelaar) → review+
Pushed by ethlin@mozilla.com: https://hg.mozilla.org/projects/graphics/rev/da70da98ac18 Part1. Apply opacity to webrender stacking context as an opacity filter. r=jrmuizel https://hg.mozilla.org/projects/graphics/rev/5454c58fe241 Part2. Change flags of reftests after applying the opacity of WRContainerLayer. r=jrmuizel
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: