aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLTexture.h
diff options
context:
space:
mode:
authorGravatar Eric Karl <ericrk@chromium.org>2017-10-12 12:44:50 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-12 20:05:31 +0000
commit914a36b248ffb538874483d86759254838866dd7 (patch)
treeea6954b9b3fc41bf87a3be1c30d5fd447656b28a /src/gpu/gl/GrGLTexture.h
parent708ec81d7a9bba12cd7e574b5c5ae80b2ad77919 (diff)
MakeBackendTextureFromSkImage
Creates a static function on SkImage which converts the SkImage to a GrBackendTexture. The texture is unowned by Skia, and must be deleted by the caller. Allows for a no-copy / no-conversion fast path if the provided image is unowned (unique()) and texture backed. Change-Id: I8a48f9cc39de792725cd72057d98cd1c4594daab Reviewed-on: https://skia-review.googlesource.com/52440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Eric Karl <ericrk@chromium.org>
Diffstat (limited to 'src/gpu/gl/GrGLTexture.h')
-rw-r--r--src/gpu/gl/GrGLTexture.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
index bb46d8d9b6..dfce602bf1 100644
--- a/src/gpu/gl/GrGLTexture.h
+++ b/src/gpu/gl/GrGLTexture.h
@@ -85,6 +85,8 @@ protected:
void setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,
const SkString& dumpName) const override;
+ bool onStealBackendTexture(GrBackendTexture*, SkImage::BackendTextureReleaseProc*) override;
+
private:
void invokeReleaseProc() {
if (fReleaseProc) {