aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-09-14 13:54:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-14 13:54:39 -0700
commit2bcab827872420762061f31200bedbd14e00b2c7 (patch)
tree9305b4dfba119c00b93f1af91967d95b4cffa538 /src/image
parent48392b7c631380bc1000e72457c40ce5e7dc2b1e (diff)
remove code from SK_SUPPORT_LEGACY_NEWFROMGENERATOR, eliminates caller of deprecated SkInstallDiscardablePixelRef
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Generator.cpp2
-rw-r--r--src/image/SkImage_Raster.cpp13
2 files changed, 0 insertions, 15 deletions
diff --git a/src/image/SkImage_Generator.cpp b/src/image/SkImage_Generator.cpp
index 731881c059..0dda339f61 100644
--- a/src/image/SkImage_Generator.cpp
+++ b/src/image/SkImage_Generator.cpp
@@ -84,7 +84,6 @@ GrTexture* SkImage_Generator::asTextureRef(GrContext* ctx, SkImageUsageType usag
return fCache->lockAsTexture(ctx, usage);
}
-#ifndef SK_SUPPORT_LEGACY_NEWFROMGENERATOR
SkImage* SkImage::NewFromGenerator(SkImageGenerator* generator, const SkIRect* subset) {
SkImageCacherator* cache = SkImageCacherator::NewFromGenerator(generator, subset);
if (!cache) {
@@ -92,4 +91,3 @@ SkImage* SkImage::NewFromGenerator(SkImageGenerator* generator, const SkIRect* s
}
return SkNEW_ARGS(SkImage_Generator, (cache));
}
-#endif
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 7eff9ef0f6..042107e3e3 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -280,16 +280,3 @@ bool SkImage_Raster::onAsLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode mode) c
}
return this->INHERITED::onAsLegacyBitmap(bitmap, mode);
}
-
-#ifdef SK_SUPPORT_LEGACY_NEWFROMGENERATOR
-SkImage* SkImage::NewFromGenerator(SkImageGenerator* generator, const SkIRect* subset) {
- SkBitmap bitmap;
- if (!SkInstallDiscardablePixelRef(generator, subset, &bitmap, nullptr)) {
- return nullptr;
- }
- if (0 == bitmap.width() || 0 == bitmap.height()) {
- return nullptr;
- }
- return new SkImage_Raster(bitmap, nullptr);
-}
-#endif