summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-12-12 10:27:25 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-12 10:27:25 -0800
commit8fed84447f0f83f36c7e083de993d4c5c0a6775f (patch)
tree9f98148acedf36f166dba0935ccc268f10f146d0 /core/fxge/skia
parentb1125f8daf52c750f6b642a343195c70f47f49f1 (diff)
downloadpdfium-8fed84447f0f83f36c7e083de993d4c5c0a6775f.tar.xz
sync with latest skia api
The canvas clip op changed to a enum class to safeguard against a regular enum used as a bool in an overloaded interface. R=reed@google.com, dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2568193002
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 51379b85db..2a004836af 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -28,6 +28,7 @@
#include "third_party/base/ptr_util.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/core/SkClipOp.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkShader.h"
@@ -1038,7 +1039,7 @@ class SkiaState {
} else {
SkASSERT(Clip::kPath == m_commands[m_clipIndex]);
m_pDriver->SkiaCanvas()->clipPath(m_clips[m_clipIndex],
- kIntersect_SkClipOp, true);
+ SkClipOp::kIntersect, true);
}
++m_clipIndex;
}
@@ -1449,7 +1450,7 @@ bool CFX_SkiaDeviceDriver::SetClip_PathFill(
SkRect skClipRect =
SkRect::MakeLTRB(rectf.left, rectf.bottom, rectf.right, rectf.top);
DebugDrawSkiaClipRect(m_pCanvas, skClipRect);
- m_pCanvas->clipRect(skClipRect, kIntersect_SkClipOp, true);
+ m_pCanvas->clipRect(skClipRect, SkClipOp::kIntersect, true);
}
#ifdef _SKIA_SUPPORT_PATHS_
@@ -1469,7 +1470,7 @@ bool CFX_SkiaDeviceDriver::SetClip_PathFill(
DebugShowSkiaPath(skClipPath);
if (!cached) {
DebugDrawSkiaClipPath(m_pCanvas, skClipPath);
- m_pCanvas->clipPath(skClipPath, kIntersect_SkClipOp, true);
+ m_pCanvas->clipPath(skClipPath, SkClipOp::kIntersect, true);
}
#ifdef _SKIA_SUPPORT_PATHS_
FX_RECT clipBox(0, 0, GetDeviceCaps(FXDC_PIXEL_WIDTH),
@@ -1503,7 +1504,7 @@ bool CFX_SkiaDeviceDriver::SetClip_PathStroke(
dst_path.transform(skMatrix);
if (!cached) {
DebugDrawSkiaClipPath(m_pCanvas, dst_path);
- m_pCanvas->clipPath(dst_path, kIntersect_SkClipOp, true);
+ m_pCanvas->clipPath(dst_path, SkClipOp::kIntersect, true);
}
#ifdef _SKIA_SUPPORT_PATHS_
FX_RECT clipBox(0, 0, GetDeviceCaps(FXDC_PIXEL_WIDTH),
@@ -1745,7 +1746,7 @@ bool CFX_SkiaDeviceDriver::DrawShading(const CPDF_ShadingPattern* pPattern,
SkColor colors[4];
m_pCanvas->save();
if (!skClip.isEmpty())
- m_pCanvas->clipPath(skClip, kIntersect_SkClipOp, true);
+ m_pCanvas->clipPath(skClip, SkClipOp::kIntersect, true);
m_pCanvas->concat(skMatrix);
while (!stream.BitStream()->IsEOF()) {
uint32_t flag = stream.GetFlag();
@@ -1776,7 +1777,7 @@ bool CFX_SkiaDeviceDriver::DrawShading(const CPDF_ShadingPattern* pPattern,
}
m_pCanvas->save();
if (!skClip.isEmpty())
- m_pCanvas->clipPath(skClip, kIntersect_SkClipOp, true);
+ m_pCanvas->clipPath(skClip, SkClipOp::kIntersect, true);
m_pCanvas->concat(skMatrix);
m_pCanvas->drawPath(skPath, paint);
m_pCanvas->restore();
@@ -1915,7 +1916,7 @@ bool CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource,
m_pCanvas->save();
SkRect skClipRect = SkRect::MakeLTRB(pClipRect->left, pClipRect->bottom,
pClipRect->right, pClipRect->top);
- m_pCanvas->clipRect(skClipRect, kIntersect_SkClipOp, true);
+ m_pCanvas->clipRect(skClipRect, SkClipOp::kIntersect, true);
void* dummy;
bool result = StartDIBits(pSource, 0xFF, argb, &m, 0, dummy, blend_type);
m_pCanvas->restore();