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

Unified Diff: Source/platform/graphics/CrossfadeGeneratedImage.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/CrossfadeGeneratedImage.h ('k') | Source/platform/graphics/GeneratedImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/CrossfadeGeneratedImage.cpp
diff --git a/Source/platform/graphics/CrossfadeGeneratedImage.cpp b/Source/platform/graphics/CrossfadeGeneratedImage.cpp
index 45009fe14785707c2659d920f607cac1aaafc9d6..8a509fb83d64f5cbc0dd526fd03f9e5a04ff61ca 100644
--- a/Source/platform/graphics/CrossfadeGeneratedImage.cpp
+++ b/Source/platform/graphics/CrossfadeGeneratedImage.cpp
@@ -68,20 +68,20 @@ void CrossfadeGeneratedImage::drawCrossfade(GraphicsContext* context)
static_cast<float>(m_crossfadeSize.height()) / toImageSize.height());
}
context->setAlphaAsFloat(m_percentage);
- context->drawImage(m_toImage, IntPoint(), CompositePlusLighter);
+ context->drawImage(m_toImage, IntPoint(), SkXfermode::kPlus_Mode);
context->restore();
context->endLayer();
}
-void CrossfadeGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator compositeOp, WebBlendMode blendMode, RespectImageOrientationEnum)
+void CrossfadeGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, SkXfermode::Mode compositeOp, RespectImageOrientationEnum)
{
// Draw nothing if either of the images hasn't loaded yet.
if (m_fromImage == Image::nullImage() || m_toImage == Image::nullImage())
return;
GraphicsContextStateSaver stateSaver(*context);
- context->setCompositeOperation(WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
+ context->setCompositeOperation(compositeOp);
context->clip(dstRect);
context->translate(dstRect.x(), dstRect.y());
if (dstRect.size() != srcRect.size())
« no previous file with comments | « Source/platform/graphics/CrossfadeGeneratedImage.h ('k') | Source/platform/graphics/GeneratedImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698