aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-05-17 08:53:36 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-17 13:40:42 +0000
commit4204da25aa4c6e0b321314aa32fd9affb4865563 (patch)
tree87ef273357fda474b96cc672d9247b216159b4fb /include
parent63e7973d1f01bd03216659b9d2267f83a752c8fb (diff)
move shadows to device virtual
This CL keeps the impl for each device backend in the utils file for simplicity (shared helpers). Future CLs may move into their respective impl as they become more specialized. Bug: skia: Change-Id: I97ce6cdcc5106ebf4c84778f943cc32d0b7613c1 Reviewed-on: https://skia-review.googlesource.com/15893 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h4
-rw-r--r--include/utils/SkNWayCanvas.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index e03b4f3daf..8ab281814e 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -24,6 +24,7 @@ class SkData;
class SkDraw;
class SkDrawable;
class SkDrawFilter;
+struct SkDrawShadowRec;
class SkImage;
class SkImageFilter;
class SkLights;
@@ -1237,6 +1238,8 @@ public:
*/
void temporary_internal_getRgnClip(SkRegion* region);
+ void private_draw_shadow_rec(const SkPath&, const SkDrawShadowRec&);
+
protected:
// default impl defers to getDevice()->newSurface(info)
virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props);
@@ -1331,6 +1334,7 @@ protected:
const SkPaint* paint);
virtual void onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice,
const SkRect& dst, const SkPaint* paint);
+ virtual void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&);
enum ClipEdgeStyle {
kHard_ClipEdgeStyle,
diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h
index ba0745e420..7701d50e26 100644
--- a/include/utils/SkNWayCanvas.h
+++ b/include/utils/SkNWayCanvas.h
@@ -71,6 +71,7 @@ protected:
void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
+ void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;