diff options
author | Herb Derby <herb@google.com> | 2018-05-01 17:06:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-02 14:46:17 +0000 |
commit | efe39bcfb82ddf8404b1df6f58809ff53dff4b99 (patch) | |
tree | 95e76d1546488015f20adbfaf7e71b6c063924f7 /include | |
parent | 83e6a67b694cdaa24b22e65b82d05bacd4b669fa (diff) |
Take sk_sp<SkDevice> instead of SkDevice*
Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680
Reviewed-on: https://skia-review.googlesource.com/125160
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 6 | ||||
-rw-r--r-- | include/utils/SkNoDrawCanvas.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index f32fd0535c..12f1926844 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -155,7 +155,7 @@ public: /** To be deprecated soon. */ - explicit SkCanvas(SkBaseDevice* device); + explicit SkCanvas(sk_sp<SkBaseDevice> device); /** Construct a canvas that draws into bitmap. Sets SkSurfaceProps::kLegacyFontHost_InitType in constructed SkSurface. @@ -2689,7 +2689,7 @@ protected: // For use by SkNoDrawCanvas (via SkCanvasVirtualEnforcer, which can't be a friend) SkCanvas(const SkIRect& bounds, InitFlags); private: - SkCanvas(SkBaseDevice* device, InitFlags); + SkCanvas(sk_sp<SkBaseDevice> device, InitFlags); SkCanvas(const SkBitmap&, std::unique_ptr<SkRasterHandleAllocator>, SkRasterHandleAllocator::Handle); @@ -2703,7 +2703,7 @@ private: // - internalSaveLayer void setupDevice(SkBaseDevice*); - SkBaseDevice* init(SkBaseDevice*, InitFlags); + void init(sk_sp<SkBaseDevice>, InitFlags); /** * Gets the bounds of the top level layer in global canvas coordinates. We don't want this diff --git a/include/utils/SkNoDrawCanvas.h b/include/utils/SkNoDrawCanvas.h index 4c67226946..518d090786 100644 --- a/include/utils/SkNoDrawCanvas.h +++ b/include/utils/SkNoDrawCanvas.h @@ -29,7 +29,7 @@ public: // TODO: investigate the users of this ctor. SkNoDrawCanvas(const SkIRect&); - explicit SkNoDrawCanvas(SkBaseDevice* device); + explicit SkNoDrawCanvas(sk_sp<SkBaseDevice> device); // Optimization to reset state to be the same as after construction. void resetCanvas(int width, int height) { |