aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlGpu.h
diff options
context:
space:
mode:
authorGravatar Timothy Liang <timliang@google.com>2018-07-17 13:28:20 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-18 18:17:32 +0000
commit760dbc4b53499f891a9e2057524956f8381535e3 (patch)
tree1fd1d7ba614122c5532e985594c202084f635098 /src/gpu/mtl/GrMtlGpu.h
parent8f8bf8880d9d9fe8280fa29304063ecc7207e59f (diff)
Reland "implemented metal gpu backend texture upload testing"
This reverts commit a80a012456a95a6996a8901268ec34ed0cc3aecb. Reason for revert: Fix bot failure. Original change's description: > Revert "implemented metal gpu backend texture upload testing" > > This reverts commit 36848f6b30ddaca461c98e13b9976b2c449ca547. > > Reason for revert: Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR failing. > > Original change's description: > > 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> > > TBR=egdaniel@google.com,ethannicholas@google.com,timliang@google.com > > Change-Id: Idf40fc78b82aec1efbcc64221b6d2bbf63353960 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/141182 > Reviewed-by: Timothy Liang <timliang@google.com> > Commit-Queue: Timothy Liang <timliang@google.com> Bug: skia: Change-Id: Ib8c5b2e0cf9de25c11c14741a32846bcc874d712 Reviewed-on: https://skia-review.googlesource.com/141183 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
Diffstat (limited to 'src/gpu/mtl/GrMtlGpu.h')
-rw-r--r--src/gpu/mtl/GrMtlGpu.h35
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;