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

Unified Diff: Source/core/paint/InlineFlowBoxPainter.cpp

Issue 868743002: Use SkXfermode::Mode in code related to Image. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 5 years, 11 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
« no previous file with comments | « Source/core/paint/InlineFlowBoxPainter.h ('k') | Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/InlineFlowBoxPainter.cpp
diff --git a/Source/core/paint/InlineFlowBoxPainter.cpp b/Source/core/paint/InlineFlowBoxPainter.cpp
index 181687c841ed9bfd165e3fda0862fa52883832e8..98a7722fb12a278fa98e2535c199ca5871a93922 100644
--- a/Source/core/paint/InlineFlowBoxPainter.cpp
+++ b/Source/core/paint/InlineFlowBoxPainter.cpp
@@ -87,7 +87,7 @@ void InlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint&
}
}
-void InlineFlowBoxPainter::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect, CompositeOperator op)
+void InlineFlowBoxPainter::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect, SkXfermode::Mode op)
{
// FIXME: This should be a for loop or similar. It's a little non-trivial to do so, however, since the layers need to be
// painted in reverse order.
@@ -96,7 +96,7 @@ void InlineFlowBoxPainter::paintFillLayers(const PaintInfo& paintInfo, const Col
paintFillLayer(paintInfo, c, fillLayer, rect, op);
}
-void InlineFlowBoxPainter::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect, CompositeOperator op)
+void InlineFlowBoxPainter::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect, SkXfermode::Mode op)
{
StyleImage* img = fillLayer.image();
bool hasFillImage = img && img->canRender(m_inlineFlowBox.renderer(), m_inlineFlowBox.renderer().style()->effectiveZoom());
@@ -270,16 +270,16 @@ void InlineFlowBoxPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoi
bool pushTransparencyLayer = false;
bool compositedMask = m_inlineFlowBox.renderer().hasLayer() && m_inlineFlowBox.boxModelObject()->layer()->hasCompositedMask();
bool flattenCompositingLayers = m_inlineFlowBox.renderer().view()->frameView() && m_inlineFlowBox.renderer().view()->frameView()->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
- CompositeOperator compositeOp = CompositeSourceOver;
+ SkXfermode::Mode compositeOp = SkXfermode::kSrcOver_Mode;
if (!compositedMask || flattenCompositingLayers) {
if ((maskBoxImage && m_inlineFlowBox.renderer().style()->maskLayers().hasImage()) || m_inlineFlowBox.renderer().style()->maskLayers().next())
pushTransparencyLayer = true;
- compositeOp = CompositeDestinationIn;
+ compositeOp = SkXfermode::kDstIn_Mode;
if (pushTransparencyLayer) {
paintInfo.context->setCompositeOperation(SkXfermode::kDstIn_Mode);
paintInfo.context->beginTransparencyLayer(1.0f);
- compositeOp = CompositeSourceOver;
+ compositeOp = SkXfermode::kSrcOver_Mode;
}
}
« no previous file with comments | « Source/core/paint/InlineFlowBoxPainter.h ('k') | Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698