Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: include/effects/SkLayerRasterizer.h

Issue 1821533002: guard rasterizer and drawlooper setters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard google3 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkLayerDrawLooper.h ('k') | public.bzl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « include/effects/SkLayerDrawLooper.h ('k') | public.bzl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698