From fea997eb29e08a85038b5fc3b14bcaa35da369e4 Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 31 Oct 2016 08:23:25 -0700 Subject: remove deprecated skia transfer mode usage Skia has removed transfer modes as a class, and made it an enum. Update PDFium to match. R=reed@google.com,dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2468443002 --- core/fxge/skia/fx_skia_device.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index a8434e62e2..f3349c906a 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -386,7 +386,7 @@ void SetBitmapPaint(bool isAlphaMask, paint->setAntiAlias(true); if (isAlphaMask) { paint->setColorFilter( - SkColorFilter::MakeModeFilter(argb, SkXfermode::kSrc_Mode)); + SkColorFilter::MakeModeFilter(argb, SkBlendMode::kSrc)); } // paint->setFilterQuality(kHigh_SkFilterQuality); paint->setBlendMode(GetSkiaBlendMode(blend_type)); @@ -1532,9 +1532,8 @@ bool CFX_SkiaDeviceDriver::DrawBitsWithMask(const CFX_DIBSource* pSource, sk_sp skMaskImage = SkImage::MakeFromBitmap(skMask); sk_sp skMaskShader = skMaskImage->makeShader( SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); - sk_sp dstInMode = SkXfermode::Make(SkXfermode::kSrcIn_Mode); - paint.setShader( - SkShader::MakeComposeShader(skMaskShader, skSrcShader, dstInMode)); + paint.setShader(SkShader::MakeComposeShader(skMaskShader, skSrcShader, + SkBlendMode::kSrcIn)); SkRect r = {0, 0, SkIntToScalar(srcWidth), SkIntToScalar(srcHeight)}; m_pCanvas->drawRect(r, paint); m_pCanvas->restore(); -- cgit v1.2.3