aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2014-06-18 15:51:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-18 15:51:20 -0700
commit9f0147143fbedba10bdae496d812a14995304924 (patch)
treef3249e7af3a67ed85eec8da912950d69d09392bf /include/effects
parentffa9b500d7e83e7dddf6a8902f47c4355b608c30 (diff)
Revert of remove guarded code - there are no more callers (https://codereview.chromium.org/343783002/)
Reason for revert: webkit still uses getTotalClip -- need to find where they define the guard. ../../skia/ext/skia_utils_mac.mm:400:42: error: no member named 'getTotalClip' in 'SkCanvas' const SkRegion& clipRgn = canvas_->getTotalClip(); ~~~~~~~ ^ Original issue's description: > remove guarded code - there are no more callers > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/c5d5cf9489977aa6fba077d1dc242029fbb4859e R=scroggo@google.com, reed@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/342843002
Diffstat (limited to 'include/effects')
-rw-r--r--include/effects/SkLayerRasterizer.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h
index c061be689d..9d4c8239f2 100644
--- a/include/effects/SkLayerRasterizer.h
+++ b/include/effects/SkLayerRasterizer.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2006 The Android Open Source Project
*
@@ -5,6 +6,7 @@
* found in the LICENSE file.
*/
+
#ifndef SkLayerRasterizer_DEFINED
#define SkLayerRasterizer_DEFINED
@@ -62,9 +64,24 @@ public:
SkDeque* fLayers;
};
+#ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
+ void addLayer(const SkPaint& paint) {
+ this->addLayer(paint, 0, 0);
+ }
+
+ /** Add a new layer (above any previous layers) to the rasterizer.
+ The layer will extract those fields that affect the mask from
+ the specified paint, but will not retain a reference to the paint
+ object itself, so it may be reused without danger of side-effects.
+ */
+ void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy);
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerRasterizer)
protected:
+ SkLayerRasterizer(SkDeque* layers);
+ SkLayerRasterizer(SkReadBuffer&);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
// override from SkRasterizer
@@ -72,12 +89,17 @@ protected:
const SkIRect* clipBounds,
SkMask* mask, SkMask::CreateMode mode) const;
+#ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
+public:
+#endif
+ SkLayerRasterizer();
+
private:
+#ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
+ SkDeque* fLayers;
+#else
const SkDeque* const fLayers;
-
- SkLayerRasterizer();
- SkLayerRasterizer(SkDeque* layers);
- SkLayerRasterizer(SkReadBuffer&);
+#endif
static SkDeque* ReadLayers(SkReadBuffer& buffer);