aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-07-19 18:28:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-20 00:21:18 +0000
commitd17f6584df9e48146dac28a1df56fb4978de6ba3 (patch)
treeaff8a4c10de409c9e07c09d936fd9c3b6b32cae3 /tools
parent22b2d8c5e111825440fa3496be1cf030a5bbafd7 (diff)
Remove GrBackendTextureDesc
Change-Id: I2b123d1782400e97ab2ce2f11e3e3d325a13e6c8 Reviewed-on: https://skia-review.googlesource.com/24748 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gpu/GrTest.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index e8672411cb..c5af01e0df 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -30,6 +30,7 @@
#include "text/GrTextBlobCache.h"
namespace GrTest {
+
void SetupAlwaysEvictAtlas(GrContext* context) {
// These sizes were selected because they allow each atlas to hold a single plot and will thus
// stress the atlas
@@ -61,17 +62,27 @@ void SetupAlwaysEvictAtlas(GrContext* context) {
GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height,
GrPixelConfig config, GrBackendObject handle) {
+ switch (backend) {
#ifdef SK_VULKAN
- if (kVulkan_GrBackend == backend) {
- GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle);
- return GrBackendTexture(width, height, *vkInfo);
- }
+ case kVulkan_GrBackend: {
+ GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle);
+ return GrBackendTexture(width, height, *vkInfo);
+ }
#endif
- SkASSERT(kOpenGL_GrBackend == backend);
- GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
- return GrBackendTexture(width, height, config, *glInfo);
+ case kOpenGL_GrBackend: {
+ GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
+ return GrBackendTexture(width, height, config, *glInfo);
+ }
+ case kMock_GrBackend: {
+ GrMockTextureInfo* mockInfo = (GrMockTextureInfo*)(handle);
+ return GrBackendTexture(width, height, config, *mockInfo);
+ }
+ default:
+ return GrBackendTexture();
+ }
}
-};
+
+} // namespace GrTest
bool GrSurfaceProxy::isWrapped_ForTesting() const {
return SkToBool(fTarget);