summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-10-06 12:28:55 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-06 12:28:55 -0700
commitaa6e8b555e113a3f91a49258ed83810abf0d4929 (patch)
treeb1604122759938c3d30f294e1c5af7ecca7712fc
parentca03f7a1c654709152a411f665ce38c3626582e8 (diff)
downloadpdfium-aa6e8b555e113a3f91a49258ed83810abf0d4929.tar.xz
switch to new skia blend mode enum class
Skia's interface to transfer modes is not described by an enum instead of a class. R=reed@google.com, dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2394683004
-rw-r--r--DEPS2
-rw-r--r--core/fxge/skia/fx_skia_device.cpp38
2 files changed, 20 insertions, 20 deletions
diff --git a/DEPS b/DEPS
index cf09e30e5b..b57ea2a702 100644
--- a/DEPS
+++ b/DEPS
@@ -15,7 +15,7 @@ vars = {
'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038',
'icu_revision': '2341038bf72869a5683a893a2b319a48ffec7f62',
'pdfium_tests_revision': '06411790a46e6497e5293f921ea9aa9fb2615e41',
- 'skia_revision': '7de57798358127e959df9255b36f30ec9d7db534',
+ 'skia_revision': 'b55ebf071dce33794f5518dcdc3a9af006285796',
'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 2e70e8014b..c4f3818182 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -149,41 +149,41 @@ SkMatrix ToFlippedSkMatrix(const CFX_Matrix& m, SkScalar flip) {
return skMatrix;
}
-SkXfermode::Mode GetSkiaBlendMode(int blend_type) {
+SkBlendMode GetSkiaBlendMode(int blend_type) {
switch (blend_type) {
case FXDIB_BLEND_MULTIPLY:
- return SkXfermode::kMultiply_Mode;
+ return SkBlendMode::kMultiply;
case FXDIB_BLEND_SCREEN:
- return SkXfermode::kScreen_Mode;
+ return SkBlendMode::kScreen;
case FXDIB_BLEND_OVERLAY:
- return SkXfermode::kOverlay_Mode;
+ return SkBlendMode::kOverlay;
case FXDIB_BLEND_DARKEN:
- return SkXfermode::kDarken_Mode;
+ return SkBlendMode::kDarken;
case FXDIB_BLEND_LIGHTEN:
- return SkXfermode::kLighten_Mode;
+ return SkBlendMode::kLighten;
case FXDIB_BLEND_COLORDODGE:
- return SkXfermode::kColorDodge_Mode;
+ return SkBlendMode::kColorDodge;
case FXDIB_BLEND_COLORBURN:
- return SkXfermode::kColorBurn_Mode;
+ return SkBlendMode::kColorBurn;
case FXDIB_BLEND_HARDLIGHT:
- return SkXfermode::kHardLight_Mode;
+ return SkBlendMode::kHardLight;
case FXDIB_BLEND_SOFTLIGHT:
- return SkXfermode::kSoftLight_Mode;
+ return SkBlendMode::kSoftLight;
case FXDIB_BLEND_DIFFERENCE:
- return SkXfermode::kDifference_Mode;
+ return SkBlendMode::kDifference;
case FXDIB_BLEND_EXCLUSION:
- return SkXfermode::kExclusion_Mode;
+ return SkBlendMode::kExclusion;
case FXDIB_BLEND_HUE:
- return SkXfermode::kHue_Mode;
+ return SkBlendMode::kHue;
case FXDIB_BLEND_SATURATION:
- return SkXfermode::kSaturation_Mode;
+ return SkBlendMode::kSaturation;
case FXDIB_BLEND_COLOR:
- return SkXfermode::kColor_Mode;
+ return SkBlendMode::kColor;
case FXDIB_BLEND_LUMINOSITY:
- return SkXfermode::kLuminosity_Mode;
+ return SkBlendMode::kLuminosity;
case FXDIB_BLEND_NORMAL:
default:
- return SkXfermode::kSrcOver_Mode;
+ return SkBlendMode::kSrcOver;
}
}
@@ -390,7 +390,7 @@ void SetBitmapPaint(bool isAlphaMask,
SkColorFilter::MakeModeFilter(argb, SkXfermode::kSrc_Mode));
}
// paint->setFilterQuality(kHigh_SkFilterQuality);
- paint->setXfermodeMode(GetSkiaBlendMode(blend_type));
+ paint->setBlendMode(GetSkiaBlendMode(blend_type));
paint->setAlpha(bitmap_alpha);
}
@@ -1196,7 +1196,7 @@ FX_BOOL CFX_SkiaDeviceDriver::FillRectWithBlend(const FX_RECT* pRect,
SkPaint spaint;
spaint.setAntiAlias(true);
spaint.setColor(fill_color);
- spaint.setXfermodeMode(GetSkiaBlendMode(blend_type));
+ spaint.setBlendMode(GetSkiaBlendMode(blend_type));
m_pCanvas->drawRect(
SkRect::MakeLTRB(pRect->left, pRect->top, pRect->right, pRect->bottom),