aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-10-31 15:11:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-31 19:35:15 +0000
commit09d9435835f48b06954904f16d14c1c2eeaaad2e (patch)
tree717ad84a3204cdb81646e0d9dee23977965ce2e5 /src/image
parentfc49b403eb3353fdefe97672017df10b64dee95a (diff)
remove lots of legacy flags
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4209 Change-Id: I49ae36a9b2bb51a6470638d3264923ff4a4dea0a Reviewed-on: https://skia-review.googlesource.com/4209 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage.cpp76
-rw-r--r--src/image/SkSurface.cpp16
2 files changed, 0 insertions, 92 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 986fdec3a4..334984dfcb 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -48,22 +48,6 @@ bool SkImage::peekPixels(SkPixmap* pm) const {
return as_IB(this)->onPeekPixels(pm);
}
-#ifdef SK_SUPPORT_LEGACY_PEEKPIXELS_PARMS
-const void* SkImage::peekPixels(SkImageInfo* info, size_t* rowBytes) const {
- SkPixmap pm;
- if (this->peekPixels(&pm)) {
- if (info) {
- *info = pm.info();
- }
- if (rowBytes) {
- *rowBytes = pm.rowBytes();
- }
- return pm.addr();
- }
- return nullptr;
-}
-#endif
-
bool SkImage::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY, CachingHint chint) const {
SkReadPixelsRec rec(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
@@ -430,66 +414,6 @@ sk_sp<SkImage> SkImage::makeNonTextureImage() const {
///////////////////////////////////////////////////////////////////////////////////////////////////
-#ifdef SK_SUPPORT_LEGACY_IMAGEFACTORY
-SkImage* SkImage::NewRasterCopy(const Info& info, const void* pixels, size_t rowBytes,
- SkColorTable* ctable) {
- return MakeRasterCopy(SkPixmap(info, pixels, rowBytes, ctable)).release();
-}
-
-SkImage* SkImage::NewRasterData(const Info& info, SkData* pixels, size_t rowBytes) {
- return MakeRasterData(info, sk_ref_sp(pixels), rowBytes).release();
-}
-
-SkImage* SkImage::NewFromRaster(const Info& info, const void* pixels, size_t rowBytes,
- RasterReleaseProc proc, ReleaseContext releasectx) {
- return MakeFromRaster(SkPixmap(info, pixels, rowBytes), proc, releasectx).release();
-}
-
-SkImage* SkImage::NewFromBitmap(const SkBitmap& bm) {
- return MakeFromBitmap(bm).release();
-}
-
-SkImage* SkImage::NewFromGenerator(SkImageGenerator* gen, const SkIRect* subset) {
- return MakeFromGenerator(gen, subset).release();
-}
-
-SkImage* SkImage::NewFromEncoded(SkData* encoded, const SkIRect* subset) {
- return MakeFromEncoded(sk_ref_sp(encoded), subset).release();
-}
-
-SkImage* SkImage::NewFromTexture(GrContext* ctx, const GrBackendTextureDesc& desc, SkAlphaType at,
- TextureReleaseProc proc, ReleaseContext releasectx) {
- return MakeFromTexture(ctx, desc, at, proc, releasectx).release();
-}
-
-SkImage* SkImage::NewFromAdoptedTexture(GrContext* ctx, const GrBackendTextureDesc& desc,
- SkAlphaType at) {
- return MakeFromAdoptedTexture(ctx, desc, at).release();
-}
-
-SkImage* SkImage::NewFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace space,
- const GrBackendObject yuvTextureHandles[3],
- const SkISize yuvSizes[3],
- GrSurfaceOrigin origin) {
- return MakeFromYUVTexturesCopy(ctx, space, yuvTextureHandles, yuvSizes, origin).release();
-}
-
-SkImage* SkImage::NewFromPicture(const SkPicture* picture, const SkISize& dimensions,
- const SkMatrix* matrix, const SkPaint* paint) {
- return MakeFromPicture(sk_ref_sp(const_cast<SkPicture*>(picture)), dimensions,
- matrix, paint).release();
-}
-
-SkImage* SkImage::NewTextureFromPixmap(GrContext* ctx, const SkPixmap& pmap, SkBudgeted budgeted) {
- return MakeTextureFromPixmap(ctx, pmap, budgeted).release();
-}
-
-SkImage* SkImage::NewFromDeferredTextureImageData(GrContext* ctx, const void* data,
- SkBudgeted budgeted) {
- return MakeFromDeferredTextureImageData(ctx, data, budgeted).release();
-}
-#endif
-
sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&, const GrMipLevel* texels,
int mipLevelCount, SkBudgeted) {
return nullptr;
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
index a0b9059e70..38bab9e32f 100644
--- a/src/image/SkSurface.cpp
+++ b/src/image/SkSurface.cpp
@@ -186,22 +186,6 @@ bool SkSurface::peekPixels(SkPixmap* pmap) {
return this->getCanvas()->peekPixels(pmap);
}
-#ifdef SK_SUPPORT_LEGACY_PEEKPIXELS_PARMS
-const void* SkSurface::peekPixels(SkImageInfo* info, size_t* rowBytes) {
- SkPixmap pm;
- if (this->peekPixels(&pm)) {
- if (info) {
- *info = pm.info();
- }
- if (rowBytes) {
- *rowBytes = pm.rowBytes();
- }
- return pm.addr();
- }
- return nullptr;
-}
-#endif
-
bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY) {
return this->getCanvas()->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);