diff options
author | Greg Daniel <egdaniel@google.com> | 2017-04-26 13:29:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-02 14:08:28 +0000 |
commit | 207282eb5ac6f009e6f736fb8e5cfcee000ee92a (patch) | |
tree | 353d63f8bb5bcbd0fd8c8ce3e3bebcf7ee1ab220 /include | |
parent | f6782442ba2aff9a0b18078e154c7bcc0a434abd (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')
-rw-r--r-- | include/gpu/GrBackendSurface.h | 13 |
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; }; }; |