aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlUtil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/mtl/GrMtlUtil.h')
-rw-r--r--src/gpu/mtl/GrMtlUtil.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gpu/mtl/GrMtlUtil.h b/src/gpu/mtl/GrMtlUtil.h
index b3a7829531..fa43295ba1 100644
--- a/src/gpu/mtl/GrMtlUtil.h
+++ b/src/gpu/mtl/GrMtlUtil.h
@@ -11,7 +11,10 @@
#import <Metal/Metal.h>
#include "GrTypesPriv.h"
+#include "ir/SkSLProgram.h"
+class GrMtlGpu;
+class GrSurface;
/**
* Returns the Metal texture format for the given GrPixelConfig
@@ -45,4 +48,18 @@ const void* GrReleaseId(id idObject);
*/
MTLTextureDescriptor* GrGetMTLTextureDescriptor(id<MTLTexture> mtlTexture);
+/**
+ * Returns a compiled MTLLibrary created from MSL code generated by SkSLC
+ */
+id<MTLLibrary> GrCompileMtlShaderLibrary(const GrMtlGpu* gpu,
+ const char* shaderString,
+ SkSL::Program::Kind kind,
+ const SkSL::Program::Settings& settings,
+ SkSL::Program::Inputs* outInputs);
+
+/**
+ * Returns a MTLTexture corresponding to the GrSurface. Optionally can do a resolve.
+ */
+id<MTLTexture> GrGetMTLTextureFromSurface(GrSurface* surface, bool doResolve);
+
#endif