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

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: Created 7 years, 1 month 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 ce1b55467411bbc81f6aa8ac81e3eafc3f8d2f27..ef30b52f2848672143c4ffab5fe52354e9feb3ab 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -3901,6 +3901,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))
@@ -3947,7 +3956,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))
rosca 2013/11/25 21:11:41 I added this new check. The tree must be rebuilt i
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