From 52e943a4693af75b40b62200191981da7458db62 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Tue, 13 Mar 2018 09:32:39 -0400 Subject: Add testing-only backend render target support to GrVkGpu. Update unit tests to use backend render targets on non-GL contexts Add named DM configs for rendering to Vulkan backend render targets and textures. Make src data ptr param to createTestingOnlyBackendTexture be const. Change-Id: I17f5375ed9bb08422006698956469d3151c4954c Reviewed-on: https://skia-review.googlesource.com/113276 Commit-Queue: Brian Salomon Reviewed-by: Greg Daniel --- src/gpu/gl/GrGLGpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpu/gl/GrGLGpu.cpp') diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 7e69fbe341..9023554b6b 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -4345,7 +4345,7 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) { } #if GR_TEST_UTILS -GrBackendTexture GrGLGpu::createTestingOnlyBackendTexture(void* pixels, int w, int h, +GrBackendTexture GrGLGpu::createTestingOnlyBackendTexture(const void* pixels, int w, int h, GrPixelConfig config, bool /*isRT*/, GrMipMapped mipMapped) { if (!this->caps()->isConfigTexturable(config)) { @@ -4395,7 +4395,7 @@ GrBackendTexture GrGLGpu::createTestingOnlyBackendTexture(void* pixels, int w, i if (!pixels) { // Fill in the texture with all zeros so we don't have random garbage pixels = defaultStorage.get(); - memset(pixels, 0, baseLayerSize); + memset(defaultStorage.get(), 0, baseLayerSize); } int width = w; -- cgit v1.2.3