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>
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 7fe9a43..f5459b1 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -60,11 +60,11 @@
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 f483c27..809c614 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -274,7 +274,7 @@
info.fFormat = format;
info.fLevelCount = 1;
- GrBackendTexture backendTex(fWidth, fHeight, &info);
+ GrBackendTexture backendTex(fWidth, fHeight, info);
fSurfaces[i] = SkSurface::MakeFromBackendTextureAsRenderTarget(fContext, backendTex,
kTopLeft_GrSurfaceOrigin,