diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-09 09:01:53 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-09 16:32:10 +0000 |
commit | f865b05fe50ca2c094b9c60e4405c6094415b4f6 (patch) | |
tree | a00eab7c3787b5b977b3ae7c15aa1732f5a42c97 /src/gpu/gl/GrGLGpu.h | |
parent | ad06544cc6ac4b403a24adda4ee36b9f35b3071f (diff) |
Add GM configs that test rendering to a GL backend texture and render target
This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now.
Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90
Reviewed-on: https://skia-review.googlesource.com/113305
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLGpu.h')
-rw-r--r-- | src/gpu/gl/GrGLGpu.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index 3a67958d5f..fa3d9e09c7 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -128,10 +128,6 @@ public: void clearStencilClip(const GrFixedClip&, bool insideStencilMask, GrRenderTarget*, GrSurfaceOrigin); - const GrGLContext* glContextForTesting() const override { - return &this->glContext(); - } - void clearStencil(GrRenderTarget*, int clearValue) override; GrGpuRTCommandBuffer* createCommandBuffer( @@ -148,7 +144,7 @@ public: GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget* rt, int width, int height) override; - +#if GR_TEST_UTILS GrBackendTexture createTestingOnlyBackendTexture(void* pixels, int w, int h, GrPixelConfig config, bool isRenderTarget, @@ -156,9 +152,17 @@ public: bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override; void deleteTestingOnlyBackendTexture(GrBackendTexture*) override; - void resetShaderCacheForTesting() const override; + GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType, + GrSRGBEncoded) override; + + void deleteTestingOnlyBackendRenderTarget(const GrBackendRenderTarget&) override; + + const GrGLContext* glContextForTesting() const override { return &this->glContext(); } + + void resetShaderCacheForTesting() const override { fProgramCache->abandon(); } void testingOnly_flushGpuAndSync() override; +#endif GrFence SK_WARN_UNUSED_RESULT insertFence() override; bool waitFence(GrFence, uint64_t timeout) override; |