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

Unified Diff: Source/platform/graphics/GraphicsContextState.cpp

Issue 661053003: Make beginLayer() and CanvasRenderingContext2D use SkXfermode::Mode. (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
Index: Source/platform/graphics/GraphicsContextState.cpp
diff --git a/Source/platform/graphics/GraphicsContextState.cpp b/Source/platform/graphics/GraphicsContextState.cpp
index e1f0ea73e31c80e5e52c9e26f435729e539ec9db..f6bb76ccf2b630f33f5f29975e3cb6a481af2fc6 100644
--- a/Source/platform/graphics/GraphicsContextState.cpp
+++ b/Source/platform/graphics/GraphicsContextState.cpp
@@ -15,8 +15,7 @@ GraphicsContextState::GraphicsContextState()
, m_fillRule(RULE_NONZERO)
, m_textDrawingMode(TextModeFill)
, m_alpha(256)
- , m_compositeOperator(CompositeSourceOver)
- , m_blendMode(WebBlendModeNormal)
+ , m_compositeOperation(SkXfermode::kSrcOver_Mode)
, m_interpolationQuality(InterpolationDefault)
, m_saveCount(0)
, m_shouldAntialias(true)
@@ -51,8 +50,7 @@ GraphicsContextState::GraphicsContextState(const GraphicsContextState& other)
, m_textDrawingMode(other.m_textDrawingMode)
, m_alpha(other.m_alpha)
, m_colorFilter(other.m_colorFilter)
- , m_compositeOperator(other.m_compositeOperator)
- , m_blendMode(other.m_blendMode)
+ , m_compositeOperation(other.m_compositeOperation)
, m_interpolationQuality(other.m_interpolationQuality)
, m_saveCount(0)
, m_shouldAntialias(other.m_shouldAntialias)
@@ -240,11 +238,9 @@ void GraphicsContextState::setColorFilter(PassRefPtr<SkColorFilter> colorFilter)
m_fillPaint.setColorFilter(m_colorFilter.get());
}
-void GraphicsContextState::setCompositeOperation(CompositeOperator compositeOperation, WebBlendMode blendMode)
+void GraphicsContextState::setCompositeOperation(SkXfermode::Mode xferMode)
{
- m_compositeOperator = compositeOperation;
- m_blendMode = blendMode;
- SkXfermode::Mode xferMode = WebCoreCompositeToSkiaComposite(compositeOperation, blendMode);
+ m_compositeOperation = xferMode;
m_strokePaint.setXfermodeMode(xferMode);
m_fillPaint.setXfermodeMode(xferMode);
}
« no previous file with comments | « Source/platform/graphics/GraphicsContextState.h ('k') | Source/platform/graphics/paint/CompositingDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698