diff options
author | Mike Reed <reed@google.com> | 2017-07-23 15:30:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-25 15:35:23 +0000 |
commit | ede7bac43fbc69b9fdf1c178890ba6353f5bb140 (patch) | |
tree | dccdba46e7abf125e2f90e6dc08eca00ad9cb09b /src/codec/SkPngCodec.h | |
parent | fa3ed03720b5083afd3620c9239863f05f2eedbd (diff) |
use unique_ptr for codec factories
Will need guards for android (at least)
Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/codec/SkPngCodec.h')
-rw-r--r-- | src/codec/SkPngCodec.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codec/SkPngCodec.h b/src/codec/SkPngCodec.h index b5f9347705..8496705258 100644 --- a/src/codec/SkPngCodec.h +++ b/src/codec/SkPngCodec.h @@ -23,8 +23,8 @@ public: static bool IsPng(const char*, size_t); // Assume IsPng was called and returned true. - static SkCodec* NewFromStream(SkStream*, Result*, - SkPngChunkReader* = nullptr); + static std::unique_ptr<SkCodec> MakeFromStream(std::unique_ptr<SkStream>, Result*, + SkPngChunkReader* = nullptr); // FIXME (scroggo): Temporarily needed by AutoCleanPng. void setIdatLength(size_t len) { fIdatLength = len; } @@ -45,8 +45,8 @@ protected: void* fPtr; }; - SkPngCodec(const SkEncodedInfo&, const SkImageInfo&, SkStream*, SkPngChunkReader*, - void* png_ptr, void* info_ptr, int bitDepth); + SkPngCodec(const SkEncodedInfo&, const SkImageInfo&, std::unique_ptr<SkStream>, + SkPngChunkReader*, void* png_ptr, void* info_ptr, int bitDepth); Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, int*) override; |