Index: Source/core/paint/LayerPainter.cpp |
diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp |
index 97018dd72d245e7982eb5873e08a878200520a76..e0b248982f199afb03b2e82b170bb1051eabe5c4 100644 |
--- a/Source/core/paint/LayerPainter.cpp |
+++ b/Source/core/paint/LayerPainter.cpp |
@@ -106,6 +106,13 @@ void LayerPainter::paintLayer(GraphicsContext* context, const LayerPaintingInfo& |
paintLayerContentsAndReflection(context, paintingInfo, paintFlags); |
} |
+static inline WebBlendMode blendModeForRenderer(const RenderObject& renderer) |
+{ |
+ // RenderObject::hasBlendMode is gated on RuntimeEnabledFeatures::cssCompositingEnabled, |
+ // otherwise the true-clause alone would suffice. |
+ return renderer.hasBlendMode() ? renderer.style()->blendMode() : WebBlendModeNormal; |
Julien - ping for review
2014/11/19 19:16:05
RenderStyle::blendMode() is gated on cssCompositin
chrishtr
2014/11/19 19:24:09
Let's get rid of all of the hasBlendMode() methods
fs
2014/11/20 09:09:46
Ah, but of course... Thanks, fixed.
|
+} |
+ |
class TransparencyLayerHelper { |
public: |
TransparencyLayerHelper(GraphicsContext* context, RenderLayer& renderLayer, const RenderLayer* rootLayer, const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, PaintBehavior paintBehavior) |
@@ -122,7 +129,7 @@ public: |
OwnPtr<BeginTransparencyDisplayItem> beginTransparencyDisplayItem = adoptPtr(new BeginTransparencyDisplayItem( |
renderLayer.renderer(), DisplayItem::BeginTransparency, renderLayer.paintingExtent(rootLayer, paintDirtyRect, subPixelAccumulation, paintBehavior), |
- renderLayer.renderer()->hasBlendMode(), renderLayer.renderer()->style()->blendMode(), renderLayer.renderer()->opacity())); |
+ blendModeForRenderer(*renderLayer.renderer()), renderLayer.renderer()->opacity())); |
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
renderLayer.renderer()->view()->viewDisplayList().add(beginTransparencyDisplayItem.release()); |
else |