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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h
index f150e3034a..53c214943f 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -13,6 +13,8 @@
#include "GrSemaphore.h"
#include "GrTexture.h"
+#include "GrMtlCaps.h"
+
#import <Metal/Metal.h>
class GrSemaphore;
@@ -24,6 +26,8 @@ public:
id<MTLDevice> device, id<MTLCommandQueue> queue);
~GrMtlGpu() override {}
+
+ const GrMtlCaps& mtlCaps() const { return *fMtlCaps.get(); }
bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight, size_t rowBytes,
GrPixelConfig readConfig, DrawPreference*,
@@ -61,7 +65,7 @@ public:
private:
GrMtlGpu(GrContext* context, const GrContextOptions& options,
- id<MTLDevice> device, id<MTLCommandQueue> queue);
+ id<MTLDevice> device, id<MTLCommandQueue> queue, MTLFeatureSet featureSet);
void onResetContext(uint32_t resetBits) override {}
@@ -141,6 +145,8 @@ private:
bool isTestingOnlyBackendTexture(GrBackendObject ) const override { return false; }
void deleteTestingOnlyBackendTexture(GrBackendObject, bool abandonTexture) override {}
+ sk_sp<GrMtlCaps> fMtlCaps;
+
id<MTLDevice> fDevice;
id<MTLCommandQueue> fQueue;