aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlGpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/mtl/GrMtlGpu.h')
-rw-r--r--src/gpu/mtl/GrMtlGpu.h16
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;
};