From ba375a88843160e6884023e9108ea84de8eb3a0f Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Wed, 11 Apr 2018 10:08:06 -0400 Subject: Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS This relies on the Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/999796 (Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS to SkUserConfig.h) landing first. Change-Id: Ie0a2b7b84cc02e46957765a0a7d6444a5320769d Reviewed-on: https://skia-review.googlesource.com/119140 Commit-Queue: Robert Phillips Reviewed-by: Brian Salomon --- tools/gpu/GrTest.cpp | 25 ------------------------- tools/gpu/GrTest.h | 4 ---- 2 files changed, 29 deletions(-) (limited to 'tools/gpu') diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index cff99a11e2..3c6046712d 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -53,31 +53,6 @@ void SetupAlwaysEvictAtlas(GrContext* context, int dim) { context->contextPriv().setTextContextAtlasSizes_ForTesting(configs); } -GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height, - GrPixelConfig config, GrMipMapped mipMapped, - GrBackendObject handle) { - switch (backend) { -#ifdef SK_VULKAN - case kVulkan_GrBackend: { - GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle); - SkASSERT((GrMipMapped::kYes == mipMapped) == (vkInfo->fLevelCount > 1)); - return GrBackendTexture(width, height, *vkInfo); - } -#endif - case kOpenGL_GrBackend: { - GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle); - SkASSERT(glInfo->fFormat); - return GrBackendTexture(width, height, mipMapped, *glInfo); - } - case kMock_GrBackend: { - GrMockTextureInfo* mockInfo = (GrMockTextureInfo*)(handle); - return GrBackendTexture(width, height, mipMapped, *mockInfo); - } - default: - return GrBackendTexture(); - } -} - } // namespace GrTest bool GrSurfaceProxy::isWrapped_ForTesting() const { diff --git a/tools/gpu/GrTest.h b/tools/gpu/GrTest.h index 6666ab1a20..9bf4344e6d 100644 --- a/tools/gpu/GrTest.h +++ b/tools/gpu/GrTest.h @@ -18,10 +18,6 @@ namespace GrTest { * constantly be evicting entries */ void SetupAlwaysEvictAtlas(GrContext*, int dim = GrDrawOpAtlas::kGlyphMaxDim); - - // TODO: remove this. It is only used in the SurfaceSemaphores Test. - GrBackendTexture CreateBackendTexture(GrBackend, int width, int height, - GrPixelConfig, GrMipMapped, GrBackendObject); }; #endif -- cgit v1.2.3