aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrBackendSurface.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-04-26 13:29:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-02 14:08:28 +0000
commit207282eb5ac6f009e6f736fb8e5cfcee000ee92a (patch)
tree353d63f8bb5bcbd0fd8c8ce3e3bebcf7ee1ab220 /include/gpu/GrBackendSurface.h
parentf6782442ba2aff9a0b18078e154c7bcc0a434abd (diff)
Make GrBackendTexture take Gr*Info refs in ctor, and copy them.
Bug: skia: Change-Id: Ic05d3384fa07560fc18c52bb8ae03541a72515f7 Reviewed-on: https://skia-review.googlesource.com/14374 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrBackendSurface.h')
-rw-r--r--include/gpu/GrBackendSurface.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index d9302dafc2..232f220282 100644
--- a/include/gpu/GrBackendSurface.h
+++ b/include/gpu/GrBackendSurface.h
@@ -14,18 +14,14 @@
class GrBackendTexture {
public:
- // The passed in GrVkImageInfo must live until the GrBackendTexture is no longer used in
- // creation of SkImages or SkSurfaces.
GrBackendTexture(int width,
int height,
- const GrVkImageInfo* vkInfo);
+ const GrVkImageInfo& vkInfo);
- // The passed in GrGLTextureInfo must live until the GrBackendTexture is no longer used in
- // creation of SkImages or SkSurfaces.
GrBackendTexture(int width,
int height,
GrPixelConfig config,
- const GrGLTextureInfo* glInfo);
+ const GrGLTextureInfo& glInfo);
int width() const { return fWidth; }
int height() const { return fHeight; }
@@ -54,9 +50,8 @@ private:
GrBackend fBackend;
union {
- const GrVkImageInfo* fVkInfo;
- const GrGLTextureInfo* fGLInfo;
- GrBackendObject fHandle;
+ GrVkImageInfo fVkInfo;
+ GrGLTextureInfo fGLInfo;
};
};