1 // Copyright 2019 Google LLC. 2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 3 #ifndef SkMetalViewBridge_DEFINED 4 #define SkMetalViewBridge_DEFINED 5 6 #include "tools/skottie_ios_app/GrContextHolder.h" 7 8 #import <MetalKit/MetalKit.h> 9 10 #include <memory> 11 12 class SkSurface; 13 template <typename T> class sk_sp; 14 15 sk_sp<SkSurface> SkMtkViewToSurface(MTKView*, GrContext*); 16 17 GrContextHolder SkMetalDeviceToGrContext(id<MTLDevice>, id<MTLCommandQueue>); 18 19 void SkMtkViewConfigForSkia(MTKView*); 20 21 #endif // SkMetalViewBridge_DEFINED 22