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

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: adding the rendering part Created 7 years, 4 months 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
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..81f6bb3a3bb6f5ef098b62f906b6d1a1dbad0cdd 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_isIsolatedGroupRoot(false)
, m_contentsOpaque(false)
, m_preserves3D(false)
, m_backfaceVisibility(true)
@@ -1016,6 +1018,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::fromWebCoreBlendMode(blendMode));
+}
+
+void GraphicsLayer::setIsIsolatedGroupRoot(bool isolated)
+{
+ if (m_isIsolatedGroupRoot == isolated)
+ return;
+ m_isIsolatedGroupRoot = isolated;
+ platformLayer()->setIsIsolatedGroupRoot(isolated);
+}
+
void GraphicsLayer::setContentsNeedsDisplay()
{
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) {

Powered by Google App Engine
This is Rietveld 408576698