Closed
Bug 1378606
Opened 7 years ago
Closed 7 years ago
Set correct blend mode for layers-free mode
Categories
(Core :: Graphics: WebRender, enhancement)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: ethlin, Assigned: mtseng)
References
Details
Attachments
(1 file)
Currently we haven't converted nsDisplayBlendMode, so the blend mode may be wrong[1]. I'll add CreateWebRenderCommands for nsDisplayBlendMode and nsDisplayClearBackground in this bug.
[1] https://dxr.mozilla.org/mozilla-central/source/gfx/layers/wr/StackingContextHelper.cpp?q=%22%2F%2F+TODO%3A+set+correct+blend+mode.&redirect_type=single#40
Reporter | ||
Updated•7 years ago
|
Summary: Set correct blend mode for layers free → Set correct blend mode for layers-free mode
Assignee | ||
Comment 1•7 years ago
|
||
I have a patch for nsDisplayBlendMode. But the result is right only if the html is inside another iframe. I suspect this might related to some stacking context problem in webrender. I'll investigate this.
Assignee | ||
Comment 2•7 years ago
|
||
I'll focus on nsDisplayBlendMode and nsDisplayBlendContainer in this bug. nsDisplayClearBackground should be handled by another bug.
Comment hidden (mozreview-request) |
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8892344 [details]
Bug 1378606 - Support mix-blend-mode in layers-free mode.
https://reviewboard.mozilla.org/r/163312/#review168742
::: layout/painting/nsDisplayList.cpp:6331
(Diff revision 1)
> + nsRect itemBounds = mList.GetClippedBoundsWithRespectToASR(aDisplayListBuilder, mActiveScrolledRoot);
> + nsRect childrenVisible = GetVisibleRectForChildren();
> + nsRect visibleRect = itemBounds.Intersect(childrenVisible);
> + float appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
> + LayerRect bounds = ViewAs<LayerPixel>(LayoutDeviceRect::FromAppUnits(visibleRect, appUnitsPerDevPixel),
> + PixelCastJustification::WebRenderHasUnitResolution);
> + LayerPoint origin = bounds.TopLeft();
This stuff is getting duplicated quite a bit. Maybe in a followup bug we can look into pushing it inside the StackingContextHelper constructor.
Attachment #8892344 -
Flags: review?(bugmail) → review+
Reporter | ||
Comment 6•7 years ago
|
||
I will have a followup bug to refactor the StackingContextHelper constructor since I also need this for nsDisplayFilter.
Assignee | ||
Comment 7•7 years ago
|
||
Pushed by mtseng@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3782e1354af
Support mix-blend-mode in layers-free mode.
Comment 9•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 10•7 years ago
|
||
https://hg.mozilla.org/projects/date/rev/e3782e1354af50aca5947a374a96a7819768be0e
Bug 1378606 - Support mix-blend-mode in layers-free mode.
You need to log in
before you can comment on or make changes to this bug.
Description
•