From 4ef0c8aea2f966f42592202659afb21f6b0fb511 Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 13 Jan 2015 04:00:55 -0800 Subject: [PATCH] remove NewTexture? BUG=skia: TBR= Review URL: https://codereview.chromium.org/831323005 --- include/core/SkImage.h | 10 +--------- src/image/SkImage_Gpu.cpp | 4 ---- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 9cc26ed4be..8d65870dc0 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -47,15 +47,6 @@ public: static SkImage* NewRasterCopy(const Info&, const void* pixels, size_t rowBytes); static SkImage* NewRasterData(const Info&, SkData* pixels, size_t rowBytes); - /** - * GrTexture is a more logical parameter for this factory, but its - * interactions with scratch cache still has issues, so for now we take - * SkBitmap instead. This will be changed in the future. skbug.com/1449 - */ - static SkImage* NewTexture(const SkBitmap&); - - virtual bool isOpaque() const { return false; } - /** * Construct a new SkImage based on the given ImageGenerator. * This function will always take ownership of the passed @@ -75,6 +66,7 @@ public: int width() const { return fWidth; } int height() const { return fHeight; } uint32_t uniqueID() const { return fUniqueID; } + virtual bool isOpaque() const { return false; } /** * Return the GrTexture that stores the image pixels. Calling getTexture diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 61fa142efd..6a42ece802 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -93,10 +93,6 @@ SkImage* SkNewImageFromBitmapTexture(const SkBitmap& bitmap, int sampleCountForN return SkNEW_ARGS(SkImage_Gpu, (bitmap, sampleCountForNewSurfaces)); } -SkImage* SkImage::NewTexture(const SkBitmap& bitmap) { - return SkNewImageFromBitmapTexture(bitmap, 0); -} - GrTexture* SkTextureImageGetTexture(SkImage* image) { return ((SkImage_Gpu*)image)->getTexture(); }