diff options
author | 2013-05-01 22:38:16 +0000 | |
---|---|---|
committer | 2013-05-01 22:38:16 +0000 | |
commit | da90474b5fcc019fb0971d12360bd05213ad4dc8 (patch) | |
tree | e14995c17b2c7a84b94a9b49a804359ef82d2e89 /include/core/SkImage.h | |
parent | 3dab1ff4a3b832678cfde99a2f14730bef83caab (diff) |
Adding public API method on SkImage for extracting the GPU texture handle.
TEST=Surface unit test
Review URL: https://codereview.chromium.org/14646007
git-svn-id: http://skia.googlecode.com/svn/trunk@8945 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkImage.h')
-rw-r--r-- | include/core/SkImage.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 3920eeab00..e6ac682876 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -72,6 +72,13 @@ public: int height() const { return fHeight; } uint32_t uniqueID() const { return fUniqueID; } + /** + * 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(); + SkShader* newShaderClamp() const; SkShader* newShader(SkShader::TileMode, SkShader::TileMode) const; |