aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-06-10 08:49:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-10 08:49:28 -0700
commit55812362f1df3c1f7341f687d5bab0adab8ac954 (patch)
tree3cc8a647e95b65d4f0c72435e567b9656fa4b45e /include
parent519580553ab85ef04c6a08d8e09ef0eb93c7bc1f (diff)
Towards removing getTexture() on SkImage
Diffstat (limited to 'include')
-rw-r--r--include/core/SkImage.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 33ae448072..61529cc71d 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -97,13 +97,6 @@ public:
uint32_t uniqueID() const { return fUniqueID; }
virtual bool isOpaque() const { return false; }
- /**
- * Return the GrTexture that stores the image pixels. Calling getTexture
- * does not affect the reference count of the GrTexture object.
- * Will return NULL if the image does not use a texture.
- */
- GrTexture* getTexture() const;
-
virtual SkShader* newShader(SkShader::TileMode,
SkShader::TileMode,
const SkMatrix* localMatrix = NULL) const;
@@ -119,6 +112,21 @@ public:
*/
const void* peekPixels(SkImageInfo* info, size_t* rowBytes) const;
+ // DEPRECATED
+ GrTexture* getTexture() const;
+
+ /**
+ * Returns true if the image is texture backed.
+ */
+ bool isTextureBacked() const;
+
+ /**
+ * Retrieves the backend API handle of the texture. If flushPendingGrContextReads then the
+ * GrContext will issue to the backend API any deferred read operations on the texture before
+ * returning.
+ */
+ GrBackendObject getTextureHandle(bool flushPendingGrContextReads) const;
+
/**
* Copy the pixels from the image into the specified buffer (pixels + rowBytes),
* converting them into the requested format (dstInfo). The image pixels are read