diff options
author | Timothy Liang <timliang@google.com> | 2018-07-13 13:24:05 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-13 18:38:14 +0000 |
commit | 36848f6b30ddaca461c98e13b9976b2c449ca547 (patch) | |
tree | ed1626f12d90a0f8f154c2b89fb938f64c8ed499 /src/gpu/mtl/GrMtlGpu.h | |
parent | 81d151103faca621cfe62c9dfbec842ec9f337c4 (diff) |
implemented metal gpu backend texture upload testing
Bug: skia:
Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71
Reviewed-on: https://skia-review.googlesource.com/140248
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/mtl/GrMtlGpu.h')
-rw-r--r-- | src/gpu/mtl/GrMtlGpu.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h index be922e5fdb..8a68b763eb 100644 --- a/src/gpu/mtl/GrMtlGpu.h +++ b/src/gpu/mtl/GrMtlGpu.h @@ -39,6 +39,23 @@ public: kSkip_SyncQueue }; +#ifdef GR_TEST_UTILS + GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h, + GrPixelConfig config, bool isRT, + GrMipMapped) override; + + bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override; + + void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override; + + GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType, + GrSRGBEncoded) override; + + void deleteTestingOnlyBackendRenderTarget(const GrBackendRenderTarget&) override; + + void testingOnly_flushGpuAndSync() override; +#endif + bool onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin, GrSurface* src, GrSurfaceOrigin srcOrigin, const SkIRect& srcRect, @@ -135,21 +152,9 @@ private: void clearStencil(GrRenderTarget* target, int clearValue) override {} #if GR_TEST_UTILS - GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h, - GrPixelConfig config, bool isRT, - GrMipMapped) override { - return GrBackendTexture(); - } - bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override { return false; } - void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override {} - - GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType, - GrSRGBEncoded) override { - return {}; - } - void deleteTestingOnlyBackendRenderTarget(const GrBackendRenderTarget&) override {} - - void testingOnly_flushGpuAndSync() override {} + bool createTestingOnlyMtlTextureInfo(GrPixelConfig config, int w, int h, bool texturable, + bool renderable, GrMipMapped mipMapped, + const void* srcData, GrMtlTextureInfo* info); #endif sk_sp<GrMtlCaps> fMtlCaps; |