From e30739a1e1d90183bc6bf7414e409e89016881f5 Mon Sep 17 00:00:00 2001 From: Timothy Liang Date: Tue, 31 Jul 2018 10:51:17 -0400 Subject: 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 Reviewed-by: Greg Daniel --- src/gpu/mtl/GrMtlUtil.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/gpu/mtl/GrMtlUtil.h') 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 #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); +/** + * Returns a compiled MTLLibrary created from MSL code generated by SkSLC + */ +id 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 GrGetMTLTextureFromSurface(GrSurface* surface, bool doResolve); + #endif -- cgit v1.2.3