aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/gpu/GrTest.cpp4
-rw-r--r--tools/viewer/sk_app/VulkanWindowContext.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 7fe9a43f28..f5459b1bba 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -60,11 +60,11 @@ GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height,
GrPixelConfig config, GrBackendObject handle) {
if (kOpenGL_GrBackend == backend) {
GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
- return GrBackendTexture(width, height, config, glInfo);
+ return GrBackendTexture(width, height, config, *glInfo);
} else {
SkASSERT(kVulkan_GrBackend == backend);
GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle);
- return GrBackendTexture(width, height, vkInfo);
+ return GrBackendTexture(width, height, *vkInfo);
}
}
};
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp
index f483c27163..809c6142ac 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -274,7 +274,7 @@ void VulkanWindowContext::createBuffers(VkFormat format) {
info.fFormat = format;
info.fLevelCount = 1;
- GrBackendTexture backendTex(fWidth, fHeight, &info);
+ GrBackendTexture backendTex(fWidth, fHeight, info);
fSurfaces[i] = SkSurface::MakeFromBackendTextureAsRenderTarget(fContext, backendTex,
kTopLeft_GrSurfaceOrigin,