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

Unified Diff: Source/platform/graphics/skia/NativeImageSkia.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/platform/graphics/skia/NativeImageSkia.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/skia/NativeImageSkia.cpp
diff --git a/Source/platform/graphics/skia/NativeImageSkia.cpp b/Source/platform/graphics/skia/NativeImageSkia.cpp
index f5b0cd0658881e2bb2aa68157502771f2eeeed46..ae1618286c022e73bac5666fd6a9e5be7babe419 100644
--- a/Source/platform/graphics/skia/NativeImageSkia.cpp
+++ b/Source/platform/graphics/skia/NativeImageSkia.cpp
@@ -54,8 +54,7 @@ void NativeImageSkia::draw(
GraphicsContext* context,
const SkRect& srcRect,
const SkRect& destRect,
- CompositeOperator compositeOp,
- WebBlendMode blendMode) const
+ SkXfermode::Mode op) const
{
TRACE_EVENT0("skia", "NativeImageSkia::draw");
@@ -64,7 +63,7 @@ void NativeImageSkia::draw(
{
SkPaint paint;
- int initialSaveCount = context->preparePaintForDrawRectToRect(&paint, srcRect, destRect, compositeOp, blendMode, !isOpaque, isLazyDecoded, isDataComplete());
+ int initialSaveCount = context->preparePaintForDrawRectToRect(&paint, srcRect, destRect, op, !isOpaque, isLazyDecoded, isDataComplete());
// We want to filter it if we decided to do interpolation above, or if
// there is something interesting going on with the matrix (like a rotation).
// Note: for serialization, we will want to subset the bitmap first so we
@@ -95,9 +94,8 @@ void NativeImageSkia::drawPattern(
const FloatRect& floatSrcRect,
const FloatSize& scale,
const FloatPoint& phase,
- CompositeOperator compositeOp,
+ SkXfermode::Mode compositeOp,
const FloatRect& destRect,
- WebBlendMode blendMode,
const IntSize& repeatSpacing) const
{
FloatRect normSrcRect = floatSrcRect;
@@ -164,7 +162,7 @@ void NativeImageSkia::drawPattern(
SkPaint paint;
paint.setShader(shader.get());
- paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
+ paint.setXfermodeMode(compositeOp);
paint.setColorFilter(context->colorFilter());
paint.setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling));
« no previous file with comments | « Source/platform/graphics/skia/NativeImageSkia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698