Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Unified Diff: Source/core/platform/graphics/GraphicsLayer.cpp

Issue 23511004: mix-blend-mode implementation for accelerated layers - blink part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed a failing reftest dependent on render-compositor bindings Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | Source/core/rendering/CompositedLayerMapping.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp
index 6c1cfd3837906df4c5bcd9cbaf9c4e9131ab1608..34fe1b26683ae482fa9c49be10a5c9887e65c230 100644
--- a/Source/core/platform/graphics/GraphicsLayer.cpp
+++ b/Source/core/platform/graphics/GraphicsLayer.cpp
@@ -82,12 +82,14 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_anchorPoint(0.5f, 0.5f, 0)
, m_opacity(1)
, m_zPosition(0)
+ , m_blendMode(blink::WebBlendModeNormal)
, m_contentsOpaque(false)
, m_preserves3D(false)
, m_backfaceVisibility(true)
, m_masksToBounds(false)
, m_drawsContent(false)
, m_contentsVisible(true)
+ , m_isRootForIsolatedGroup(false)
, m_hasScrollParent(false)
, m_hasClipParent(false)
, m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
@@ -609,6 +611,16 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeFlags fl
ts << "(opacity " << m_opacity << ")\n";
}
+ if (m_blendMode != blink::WebBlendModeNormal) {
+ writeIndent(ts, indent + 1);
+ ts << "(blendMode " << compositeOperatorName(CompositeSourceOver, m_blendMode) << ")\n";
+ }
+
+ if (m_isRootForIsolatedGroup) {
+ writeIndent(ts, indent + 1);
+ ts << "(isolate " << m_isRootForIsolatedGroup << ")\n";
+ }
+
if (m_contentsOpaque) {
writeIndent(ts, indent + 1);
ts << "(contentsOpaque " << m_contentsOpaque << ")\n";
@@ -945,6 +957,22 @@ void GraphicsLayer::setOpacity(float opacity)
platformLayer()->setOpacity(opacity);
}
+void GraphicsLayer::setBlendMode(blink::WebBlendMode blendMode)
+{
+ if (m_blendMode == blendMode)
+ return;
+ m_blendMode = blendMode;
+ platformLayer()->setBlendMode(blink::WebBlendMode(blendMode));
+}
+
+void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated)
+{
+ if (m_isRootForIsolatedGroup == isolated)
+ return;
+ m_isRootForIsolatedGroup = isolated;
+ platformLayer()->setIsRootForIsolatedGroup(isolated);
+}
+
void GraphicsLayer::setContentsNeedsDisplay()
{
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) {
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | Source/core/rendering/CompositedLayerMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698