GrMtlTrampoline.mm 752 B

12345678910111213141516171819202122232425
  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. #include "src/gpu/mtl/GrMtlTrampoline.h"
  8. #include "src/gpu/mtl/GrMtlGpu.h"
  9. #if !__has_feature(objc_arc)
  10. #error This file must be compiled with Arc. Use -fobjc-arc flag
  11. #endif
  12. sk_sp<GrGpu> GrMtlTrampoline::MakeGpu(GrContext* context,
  13. const GrContextOptions& options,
  14. void* device,
  15. void* queue) {
  16. return GrMtlGpu::Make(context,
  17. options,
  18. (__bridge id<MTLDevice>)device,
  19. (__bridge id<MTLCommandQueue>)queue);
  20. }