1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef GrMtlTrampoline_DEFINED 9 #define GrMtlTrampoline_DEFINED 10 11 #include "include/gpu/ganesh/GrTypes.h" 12 13 #include <memory> 14 15 class GrDirectContext; 16 class GrGpu; 17 struct GrContextOptions; 18 struct GrMtlBackendContext; 19 20 /* 21 * This class is used to hold functions which trampoline from the Ganesh cpp code to the GrMtl 22 * objective-c files. 23 */ 24 class GrMtlTrampoline { 25 public: 26 static std::unique_ptr<GrGpu> MakeGpu(const GrMtlBackendContext&, const GrContextOptions&, 27 GrDirectContext*); 28 }; 29 30 #endif 31 32