Index: Source/core/platform/graphics/GraphicsLayer.cpp |
diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp |
index 6b6505187d94cf264d69571656488d616460a3b2..47d1cbce643dd680ca97368383990c78730cb83a 100644 |
--- a/Source/core/platform/graphics/GraphicsLayer.cpp |
+++ b/Source/core/platform/graphics/GraphicsLayer.cpp |
@@ -109,6 +109,8 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) |
, m_anchorPoint(0.5f, 0.5f, 0) |
, m_opacity(1) |
, m_zPosition(0) |
+ , m_blendMode(BlendModeNormal) |
+ , m_isRootForIsolatedGroup(false) |
, m_contentsOpaque(false) |
, m_preserves3D(false) |
, m_backfaceVisibility(true) |
@@ -729,6 +731,16 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeFlags fl |
ts << "(opacity " << m_opacity << ")\n"; |
} |
+ if (m_blendMode != BlendModeNormal) { |
+ writeIndent(ts, indent + 1); |
+ ts << "(blendMode " << m_blendMode << ")\n"; |
shawnsingh
2013/09/13 10:22:59
Does this mean that various blend modes will be id
rosca
2013/09/19 14:26:54
Done.
|
+ } |
+ |
+ if (m_isRootForIsolatedGroup) { |
+ writeIndent(ts, indent + 1); |
+ ts << "(isolate " << m_isRootForIsolatedGroup << ")\n"; |
+ } |
+ |
if (m_contentsOpaque) { |
writeIndent(ts, indent + 1); |
ts << "(contentsOpaque " << m_contentsOpaque << ")\n"; |
@@ -1016,6 +1028,22 @@ void GraphicsLayer::setOpacity(float opacity) |
platformLayer()->setOpacity(opacity); |
} |
+void GraphicsLayer::setBlendMode(BlendMode blendMode) |
+{ |
+ if (m_blendMode == blendMode) |
+ return; |
+ m_blendMode = blendMode; |
+ platformLayer()->setBlendMode(WebKit::WebBlendMode(blendMode)); |
shawnsingh
2013/09/13 10:22:59
using platformLayer() here seems correct. I just
rosca
2013/09/19 14:26:54
We set the blend mode to the outermost layer so it
|
+} |
+ |
+void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) |
+{ |
+ if (m_isRootForIsolatedGroup == isolated) |
+ return; |
+ m_isRootForIsolatedGroup = isolated; |
+ platformLayer()->setIsRootForIsolatedGroup(isolated); |
shawnsingh
2013/09/13 10:22:59
Same issue for platformLayer() accessor here.
rosca
2013/09/19 14:26:54
Done.
|
+} |
+ |
void GraphicsLayer::setContentsNeedsDisplay() |
{ |
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { |