aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-12-13 15:00:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-13 21:34:20 +0000
commitb67821da87ffa711c07af75ee618b13dbccd6b7d (patch)
tree25179bbe05f6104f0314458f4cdd52475dfed73e /src/gpu/mtl
parent81d9f0d42eea5bb428808e0a48e4ef85aec45e10 (diff)
Add GrBackendTexture & GrBackendRenderTarget access methods to GrTexture and GrRenderTarget
Change-Id: I627fcc2cab1d04169f49e33a6c17e161e9a9772a Reviewed-on: https://skia-review.googlesource.com/84621 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/mtl')
-rw-r--r--src/gpu/mtl/GrMtlRenderTarget.h6
-rw-r--r--src/gpu/mtl/GrMtlTexture.h1
-rw-r--r--src/gpu/mtl/GrMtlTexture.mm4
3 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/mtl/GrMtlRenderTarget.h b/src/gpu/mtl/GrMtlRenderTarget.h
index 186f703792..4dac306e7e 100644
--- a/src/gpu/mtl/GrMtlRenderTarget.h
+++ b/src/gpu/mtl/GrMtlRenderTarget.h
@@ -10,6 +10,8 @@
#include "GrRenderTarget.h"
+#include "GrBackendSurface.h"
+
#import <Metal/Metal.h>
class GrMtlGpu;
@@ -40,6 +42,10 @@ public:
GrBackendObject getRenderTargetHandle() const override;
+ GrBackendRenderTarget getBackendRenderTarget() const override {
+ return GrBackendRenderTarget(); // invalid
+ }
+
protected:
GrMtlRenderTarget(GrMtlGpu* gpu,
const GrSurfaceDesc& desc,
diff --git a/src/gpu/mtl/GrMtlTexture.h b/src/gpu/mtl/GrMtlTexture.h
index 3f223d5d52..2d7c3011df 100644
--- a/src/gpu/mtl/GrMtlTexture.h
+++ b/src/gpu/mtl/GrMtlTexture.h
@@ -27,6 +27,7 @@ public:
id<MTLTexture> mtlTexture() const { return fTexture; }
GrBackendObject getTextureHandle() const override;
+ GrBackendTexture getBackendTexture() const override;
void textureParamsModified() override {}
diff --git a/src/gpu/mtl/GrMtlTexture.mm b/src/gpu/mtl/GrMtlTexture.mm
index 0bd50ed556..26e5918faf 100644
--- a/src/gpu/mtl/GrMtlTexture.mm
+++ b/src/gpu/mtl/GrMtlTexture.mm
@@ -79,3 +79,7 @@ GrBackendObject GrMtlTexture::getTextureHandle() const {
void* voidTex = (__bridge_retained void*)fTexture;
return (GrBackendObject)voidTex;
}
+
+GrBackendTexture GrMtlTexture::getBackendTexture() const {
+ return GrBackendTexture(); // invalid
+}