diff options
author | caryclark <caryclark@google.com> | 2016-10-31 08:23:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-31 08:23:25 -0700 |
commit | fea997eb29e08a85038b5fc3b14bcaa35da369e4 (patch) | |
tree | 4d9a74bb1bb4d6595acc26fce84271cfbae763e8 /core/fxge/skia | |
parent | 20855384b8149a631c3c1d229551523c12eb767b (diff) | |
download | pdfium-fea997eb29e08a85038b5fc3b14bcaa35da369e4.tar.xz |
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
Diffstat (limited to 'core/fxge/skia')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<SkImage> skMaskImage = SkImage::MakeFromBitmap(skMask); sk_sp<SkShader> skMaskShader = skMaskImage->makeShader( SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); - sk_sp<SkXfermode> 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(); |