skia2/tools/skottie_ios_app/SkMetalViewBridge.h
Hal Canary efb4ed86cf SkMetalDeviceToGrContext: no longer needs any Skia headers
Also: mv experimental/skottie_ios tools/skottie_ios_app

Motivation:  make using SkMetalViewBridge that much easier for clients.

Change-Id: I985930ae0751d218e89c48c57b69d85ad7a1e703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259279
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-16 18:09:40 +00:00

25 lines
666 B
Objective-C

// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#ifndef SkMetalViewBridge_DEFINED
#define SkMetalViewBridge_DEFINED
#import <MetalKit/MetalKit.h>
#include <memory>
class SkSurface;
class GrContext;
template <typename T> class sk_sp;
sk_sp<SkSurface> SkMtkViewToSurface(MTKView*, GrContext*);
struct GrContextRelease { void operator()(GrContext*); };
using GrContextHolder = std::unique_ptr<GrContext, GrContextRelease>;
GrContextHolder SkMetalDeviceToGrContext(id<MTLDevice>, id<MTLCommandQueue>);
void SkMtkViewConfigForSkia(MTKView*);
#endif // SkMetalViewBridge_DEFINED