Flutter Impeller
surface_mtl.mm
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
6 
9 
10 namespace impeller::interop {
11 
12 SurfaceMTL::SurfaceMTL(Context& context, void* metal_drawable)
13  : SurfaceMTL(context,
14  impeller::SurfaceMTL::MakeFromMetalLayerDrawable(
15  context.GetContext(),
16  (__bridge id<CAMetalDrawable>)metal_drawable,
17  reinterpret_cast<interop::ContextMTL*>(&context)
18  ->GetSwapchainTransients())) {}
19 
21  std::shared_ptr<impeller::Surface> surface)
22  : Surface(context, std::move(surface)) {}
23 
24 SurfaceMTL::~SurfaceMTL() = default;
25 
26 } // namespace impeller::interop
SurfaceMTL(Context &context, void *metal_drawable)
Definition: surface_mtl.mm:12
Definition: comparable.h:95