diff options
author | Timothy Liang <timliang@google.com> | 2018-07-31 10:51:17 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-31 16:25:55 +0000 |
commit | e30739a1e1d90183bc6bf7414e409e89016881f5 (patch) | |
tree | 4b84aeadee82fde5b45ec75aa1782897e2c9625f /src/gpu/mtl/GrMtlGpu.h | |
parent | c8ece3d5f877d67114dfda51a336dfdf7838095a (diff) |
implemented copy surface as draw for metal gpu backend
Bug: skia:
Change-Id: Ie61bd6ad9f288b8a025d44f887a0954101a7d710
Reviewed-on: https://skia-review.googlesource.com/142687
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 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h index 98132fa725..4ba07205e4 100644 --- a/src/gpu/mtl/GrMtlGpu.h +++ b/src/gpu/mtl/GrMtlGpu.h @@ -14,6 +14,8 @@ #include "GrTexture.h" #include "GrMtlCaps.h" +#include "GrMtlCopyManager.h" +#include "GrMtlResourceProvider.h" #import <Metal/Metal.h> @@ -21,12 +23,16 @@ class GrMtlTexture; class GrSemaphore; struct GrMtlBackendContext; +namespace SkSL { + class Compiler; +} + class GrMtlGpu : public GrGpu { public: static sk_sp<GrGpu> Make(GrContext* context, const GrContextOptions& options, id<MTLDevice> device, id<MTLCommandQueue> queue); - ~GrMtlGpu() override {} + ~GrMtlGpu() override = default; const GrMtlCaps& mtlCaps() const { return *fMtlCaps.get(); } @@ -34,6 +40,8 @@ public: id<MTLCommandBuffer> commandBuffer() const { return fCmdBuffer; } + GrMtlResourceProvider& resourceProvider() { return fResourceProvider; } + enum SyncQueue { kForce_SyncQueue, kSkip_SyncQueue @@ -73,6 +81,8 @@ public: GrGpuTextureCommandBuffer* createCommandBuffer(GrTexture*, GrSurfaceOrigin) override; + SkSL::Compiler* shaderCompiler() const { return fCompiler.get(); } + GrFence SK_WARN_UNUSED_RESULT insertFence() override { return 0; } bool waitFence(GrFence, uint64_t) override { return true; } void deleteFence(GrFence) const override {} @@ -162,6 +172,10 @@ private: id<MTLCommandBuffer> fCmdBuffer; + std::unique_ptr<SkSL::Compiler> fCompiler; + GrMtlCopyManager fCopyManager; + GrMtlResourceProvider fResourceProvider; + typedef GrGpu INHERITED; }; |