diff options
author | Mike Reed <reed@google.com> | 2017-02-21 22:48:21 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-22 04:31:18 +0000 |
commit | 22eb2f1aa09b0fb27c199c2cc96cd74b2098d502 (patch) | |
tree | e4eef8dae7fc011539ec626425cb4a0279894d81 /src | |
parent | ddbd37eb68fc2dbe125df5399f17fe0f091dba41 (diff) |
remove guard for SkImageGenerator api
BUG=skia:
Change-Id: I0c01fbf935be5d933aa2ef67a0fb2edba4941fa7
Reviewed-on: https://skia-review.googlesource.com/8835
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkImageGenerator.cpp | 33 | ||||
-rw-r--r-- | src/image/SkImage_Generator.cpp | 6 |
2 files changed, 0 insertions, 39 deletions
diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp index d4d42bad5f..77f2c38618 100644 --- a/src/core/SkImageGenerator.cpp +++ b/src/core/SkImageGenerator.cpp @@ -184,17 +184,6 @@ SkGraphics::SetImageGeneratorFromEncodedDataFactory(ImageGeneratorFromEncodedDat return prev; } -#ifdef SK_SUPPORT_BARE_PTR_IMAGEGENERATOR -static SkGraphics::ImageGeneratorFromEncodedFactory gLegacyFactory; -SkGraphics::ImageGeneratorFromEncodedFactory -SkGraphics::SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFactory factory) -{ - ImageGeneratorFromEncodedFactory prev = gLegacyFactory; - gLegacyFactory = factory; - return prev; -} -#endif - std::unique_ptr<SkImageGenerator> SkImageGenerator::MakeFromEncoded(sk_sp<SkData> data) { if (!data) { return nullptr; @@ -204,27 +193,5 @@ std::unique_ptr<SkImageGenerator> SkImageGenerator::MakeFromEncoded(sk_sp<SkData return generator; } } -#ifdef SK_SUPPORT_BARE_PTR_IMAGEGENERATOR - if (gLegacyFactory) { - if (SkImageGenerator* generator = gLegacyFactory(data.get())) { - return std::unique_ptr<SkImageGenerator>(generator); - } - } -#endif return SkImageGenerator::MakeFromEncodedImpl(std::move(data)); } - -#ifdef SK_SUPPORT_BARE_PTR_IMAGEGENERATOR -#include "SkPicture.h" - -SkImageGenerator* SkImageGenerator::NewFromPicture(const SkISize& size, const SkPicture* picture, - const SkMatrix* matrix, const SkPaint* paint, - SkImage::BitDepth depth, - sk_sp<SkColorSpace> cs) { - return MakeFromPicture(size, sk_ref_sp(const_cast<SkPicture*>(picture)), matrix, paint, - depth, std::move(cs)).release(); -} -SkImageGenerator* SkImageGenerator::NewFromEncoded(SkData* data) { - return MakeFromEncoded(sk_ref_sp(data)).release(); -} -#endif diff --git a/src/image/SkImage_Generator.cpp b/src/image/SkImage_Generator.cpp index 7e47523c7c..c38b7e4937 100644 --- a/src/image/SkImage_Generator.cpp +++ b/src/image/SkImage_Generator.cpp @@ -100,9 +100,3 @@ sk_sp<SkImage> SkImage::MakeFromGenerator(std::unique_ptr<SkImageGenerator> gene return validator ? sk_make_sp<SkImage_Generator>(&validator) : nullptr; } - -#ifdef SK_SUPPORT_BARE_PTR_IMAGEGENERATOR -sk_sp<SkImage> SkImage::MakeFromGenerator(SkImageGenerator* gen, const SkIRect* subset) { - return MakeFromGenerator(std::unique_ptr<SkImageGenerator>(gen), subset); -} -#endif |