-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transparent, composited canvas is rendered black when layer is changed to render layer backing sharing #15599
Conversation
EWS run on previous version of this PR (hash a34982c) |
@@ -3443,6 +3443,9 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap | |||
#endif | |||
return; | |||
} | |||
GraphicsContextStateSaver saver(context, m_shouldPaintUsingCompositeCopy); | |||
if (m_shouldPaintUsingCompositeCopy) | |||
context.setCompositeOperation(CompositeOperator::Copy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit weird to do this here. Sure, we know that the canvas is the only thing painted into this layer, but it looks weird to have this cover the scope of all the painting. Maybe it will do something odd for event regions, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd feel OK if this was moved to before layer.paintLayerContents()
.
a34982c
to
e43669b
Compare
EWS run on current version of this PR (hash e43669b) |
β¦d to render layer backing sharing https://bugs.webkit.org/show_bug.cgi?id=258927 rdar://110088034 Reviewed by Simon Fraser. Explicitly composited canvas element might switch to being composited to other RenderLayerBacking. This left the RenderLayer::m_shouldPaintUsingCompositeCopy unreset. Instead, store the flag to RenderLayerBacking. * Source/WebCore/html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * Source/WebCore/html/HTMLCanvasElement.h: * Source/WebCore/rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): * Source/WebCore/rendering/RenderLayer.h: (WebCore::RenderLayer::shouldPaintUsingCompositeCopy const): Deleted. (WebCore::RenderLayer::setShouldPaintUsingCompositeCopy): Deleted. * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): (WebCore::RenderLayerBacking::paintIntoLayer): * Source/WebCore/rendering/RenderLayerBacking.h: Canonical link: https://commits.webkit.org/265837@main
e43669b
to
dbef4cf
Compare
Committed 265837@main (dbef4cf): https://commits.webkit.org/265837@main Reviewed commits have been landed. Closing PR #15599 and removing active labels. |
dbef4cf
e43669b