skia2/tools/skottie_ios_app/SkMetalViewBridge.h
Hal Canary 118df7cf62 skottie_ios_app: Add OpenGL.
- Consolidate Skottie logic into SkottieViewController class that no longer
    knows about which backend we use.

  - Abstract out SkiaViewController interdace which SkottieViewController
    implements.

  - Create three classes SkiaGLView, SkiaUIView, and SkiaMtkView, which all
    accept SkiaViewController objects but override GLKView, UIView, and
    MTKView.

  - SkAnimationDraw and SkTimeKeeper now SkiaViewController
    implementation details, no longer shared in headers.

Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Change-Id: I96ff2911d63da7d5327c81f91996b2a1b12c4419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261178
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2020-01-14 16:16:32 +00:00

22 lines
571 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
#include "tools/skottie_ios_app/GrContextHolder.h"
#import <MetalKit/MetalKit.h>
#include <memory>
class SkSurface;
template <typename T> class sk_sp;
sk_sp<SkSurface> SkMtkViewToSurface(MTKView*, GrContext*);
GrContextHolder SkMetalDeviceToGrContext(id<MTLDevice>, id<MTLCommandQueue>);
void SkMtkViewConfigForSkia(MTKView*);
#endif // SkMetalViewBridge_DEFINED