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 | |
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
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 7 |
2 files changed, 4 insertions, 5 deletions
@@ -16,7 +16,7 @@ vars = { 'icu_revision': '2341038bf72869a5683a893a2b319a48ffec7f62', 'instrumented_lib_revision': '45f5814b1543e41ea0be54c771e3840ea52cca4a', 'pdfium_tests_revision': '06411790a46e6497e5293f921ea9aa9fb2615e41', - 'skia_revision': 'b55ebf071dce33794f5518dcdc3a9af006285796', + 'skia_revision': 'a9fd106d0c4dd5449c607add0716db7bbd81bc73', 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d', 'trace_event_revision': '6232c13e4edb36c84c61653fdae5a4afb5af9745', 'v8_revision': 'a964163e6ac4f1124b22ea7e46b8afe26dec02e0', 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(); |