aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mock
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-13 09:32:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-13 15:02:57 +0000
commit52e943a4693af75b40b62200191981da7458db62 (patch)
tree50449983945bb8ed6eabc8c71ed4ad8f33aa8918 /src/gpu/mock
parent65247e595d8e67ebc2857a8c3bb5ed53893b500d (diff)
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 <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/mock')
-rw-r--r--src/gpu/mock/GrMockGpu.cpp2
-rw-r--r--src/gpu/mock/GrMockGpu.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/mock/GrMockGpu.cpp b/src/gpu/mock/GrMockGpu.cpp
index b1c3e7dd7d..4b786ab9b2 100644
--- a/src/gpu/mock/GrMockGpu.cpp
+++ b/src/gpu/mock/GrMockGpu.cpp
@@ -181,7 +181,7 @@ GrStencilAttachment* GrMockGpu::createStencilAttachmentForRenderTarget(const GrR
}
#if GR_TEST_UTILS
-GrBackendTexture GrMockGpu::createTestingOnlyBackendTexture(void* pixels, int w, int h,
+GrBackendTexture GrMockGpu::createTestingOnlyBackendTexture(const void* pixels, int w, int h,
GrPixelConfig config, bool isRT,
GrMipMapped mipMapped) {
GrMockTextureInfo info;
diff --git a/src/gpu/mock/GrMockGpu.h b/src/gpu/mock/GrMockGpu.h
index f0d7c07deb..8a3dc3045b 100644
--- a/src/gpu/mock/GrMockGpu.h
+++ b/src/gpu/mock/GrMockGpu.h
@@ -114,8 +114,9 @@ private:
void clearStencil(GrRenderTarget*, int clearValue) override {}
#if GR_TEST_UTILS
- GrBackendTexture createTestingOnlyBackendTexture(void* pixels, int w, int h, GrPixelConfig,
- bool isRT, GrMipMapped) override;
+ GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h,
+ GrPixelConfig, bool isRT,
+ GrMipMapped) override;
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override;