aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-01-31 17:53:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-01 16:04:41 +0000
commit3390e1526975e4250402e6642cd6875401abfc9e (patch)
tree85314856209b7a17aff0e001ae4a45bd952f693d /include
parent77b3f32936dd069fa6a27f870b3b30035733d940 (diff)
Expand SkImage::getTextureHandle call
AFAICT cc/output/gl_renderer.cc only calls SkImage:getTexture to determine the origin of the backing GrTexture. What do y'all think of this CL as a means of removing that call to getTexture? One alternative would be to add a new entry point like: bool SkImage::getBackendTextureDesc(GrBackendTextureDesc* desc) const; which fills in the entire desc and returns whether the image is texture backed. Change-Id: Idd302c0a11d69ad08e0100bcf546b3bbaa7cf27e Reviewed-on: https://skia-review.googlesource.com/7788 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkImage.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 076da331a2..2e421c90d1 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -223,8 +223,11 @@ public:
* Retrieves the backend API handle of the texture. If flushPendingGrContextIO then the
* GrContext will issue to the backend API any deferred IO operations on the texture before
* returning.
+ * If 'origin' is supplied it will be filled in with the origin of the content drawn
+ * into the image.
*/
- GrBackendObject getTextureHandle(bool flushPendingGrContextIO) const;
+ GrBackendObject getTextureHandle(bool flushPendingGrContextIO,
+ GrSurfaceOrigin* origin = nullptr) const;
/**
* Hints to image calls where the system might cache computed intermediates (e.g. the results