aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlGpu.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-07-31 10:45:52 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-31 15:03:22 +0000
commitcebcb84739c261e729a054ff097adca32a1b537f (patch)
tree6b936450dc9b90357152c94e32d4c77bdba66042 /src/gpu/mtl/GrMtlGpu.h
parent6bd729d8ebc98548fd92e081e1d1163bbc2ec815 (diff)
Add caps files for metal
Bug: skia: Change-Id: I8e7488320d4237cf67d6ebeaad319d3de75b67e6 Reviewed-on: https://skia-review.googlesource.com/27741 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
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;