Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: include/core/SkImage.h

Issue 1166993002: Towards removing getTexture() from SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/utils.gyp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 33ae448072cbe81929f5b6342fc607978a0a1f04..61529cc71d50ec88bb621366ff02b8a85ec24761 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
« no previous file with comments | « gyp/utils.gyp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698