diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-13 09:32:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-13 15:02:57 +0000 |
commit | 52e943a4693af75b40b62200191981da7458db62 (patch) | |
tree | 50449983945bb8ed6eabc8c71ed4ad8f33aa8918 /src/gpu/vk/GrVkGpu.h | |
parent | 65247e595d8e67ebc2857a8c3bb5ed53893b500d (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/vk/GrVkGpu.h')
-rw-r--r-- | src/gpu/vk/GrVkGpu.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h index b5ddcb894a..6eac5c8086 100644 --- a/src/gpu/vk/GrVkGpu.h +++ b/src/gpu/vk/GrVkGpu.h @@ -70,9 +70,8 @@ public: void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} #if GR_TEST_UTILS - GrBackendTexture createTestingOnlyBackendTexture(void* pixels, int w, int h, - GrPixelConfig config, - bool isRenderTarget, + GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h, + GrPixelConfig config, bool isRenderTarget, GrMipMapped) override; bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override; void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override; @@ -247,6 +246,12 @@ private: void resolveImage(GrSurface* dst, GrVkRenderTarget* src, const SkIRect& srcRect, const SkIPoint& dstPoint); +#if GR_TEST_UTILS + bool createTestingOnlyVkImage(GrPixelConfig config, int w, int h, bool texturable, + bool renderable, GrMipMapped mipMapped, const void* srcData, + GrVkImageInfo* info); +#endif + sk_sp<const GrVkBackendContext> fBackendContext; sk_sp<GrVkCaps> fVkCaps; |