Index: include/effects/SkLayerRasterizer.h |
diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h |
index c6ac1de36309c75e2af34265a29d168746a2dfe0..9ddcd4e6c3f0a0452ea579e00af820d0f5468b00 100644 |
--- a/include/effects/SkLayerRasterizer.h |
+++ b/include/effects/SkLayerRasterizer.h |
@@ -1,4 +1,3 @@ |
- |
/* |
* Copyright 2006 The Android Open Source Project |
* |
@@ -6,7 +5,6 @@ |
* found in the LICENSE file. |
*/ |
- |
#ifndef SkLayerRasterizer_DEFINED |
#define SkLayerRasterizer_DEFINED |
@@ -44,7 +42,7 @@ public: |
* |
* The caller is responsible for calling unref() on the returned object, if non NULL. |
*/ |
- SkLayerRasterizer* detachRasterizer(); |
+ sk_sp<SkLayerRasterizer> detach(); |
/** |
* Create and return a new immutable SkLayerRasterizer that contains a shapshot of the |
@@ -58,7 +56,16 @@ public: |
* |
* The caller is responsible for calling unref() on the returned object, if non NULL. |
*/ |
- SkLayerRasterizer* snapshotRasterizer() const; |
+ sk_sp<SkLayerRasterizer> snapshot() const; |
+ |
+#ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR |
+ SkLayerRasterizer* detachRasterizer() { |
+ return this->detach().release(); |
+ } |
+ SkLayerRasterizer* snapshotRasterizer() const { |
+ return this->snapshot().release(); |
+ } |
+#endif |
private: |
SkDeque* fLayers; |