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

Unified Diff: Source/core/rendering/RenderLayer.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/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index aa8d0e1601e68c17665463eacacb33799dc2366d..323d1957feaafe1d7f55fdb751baf80aa8b2de2a 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -3941,6 +3941,15 @@ inline bool RenderLayer::needsCompositingLayersRebuiltForFilters(const RenderSty
return false;
}
+inline bool RenderLayer::needsCompositingLayersRebuiltForBlending(const RenderStyle* oldStyle, const RenderStyle* newStyle) const
+{
+ ASSERT(newStyle);
+ if (!hasCompositedLayerMapping())
+ return false;
+ return (shouldIsolateCompositedDescendants() && !stackingNode()->isStackingContext())
+ || (oldStyle && (oldStyle->hasBlendMode() != newStyle->hasBlendMode()));
+}
+
void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle)
{
if (!hasOrHadFilters(oldStyle, newStyle))
@@ -3987,7 +3996,8 @@ void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle)
if (compositor()->updateLayerCompositingState(this)
|| needsCompositingLayersRebuiltForClip(oldStyle, newStyle)
|| needsCompositingLayersRebuiltForOverflow(oldStyle, newStyle)
- || needsCompositingLayersRebuiltForFilters(oldStyle, newStyle, didPaintWithFilters))
+ || needsCompositingLayersRebuiltForFilters(oldStyle, newStyle, didPaintWithFilters)
+ || needsCompositingLayersRebuiltForBlending(oldStyle, newStyle))
compositor()->setCompositingLayersNeedRebuild();
else if (hasCompositedLayerMapping())
compositedLayerMapping()->updateGraphicsLayerGeometry();
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698