| 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
5 #include "impeller/toolkit/interop/backend/metal/surface_mtl.h"
6
7 #include "impeller/renderer/backend/metal/surface_mtl.h"
8 #include "impeller/toolkit/interop/backend/metal/context_mtl.h"
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
20 SurfaceMTL::SurfaceMTL(Context& context,
21 std::shared_ptr<impeller::Surface> surface)
22 : Surface(context, std::move(surface)) {}
23
24 SurfaceMTL::~SurfaceMTL() = default;
25
26 } // namespace impeller::interop
impeller::interop::Context
Definition: context.h:16
impeller::interop::ContextMTL
Definition: context_mtl.h:13
impeller::interop::Surface
Definition: surface.h:19
impeller::interop::SurfaceMTL
Definition: surface_mtl.h:12
impeller::interop::SurfaceMTL::~SurfaceMTL
~SurfaceMTL()
impeller::interop::SurfaceMTL::SurfaceMTL
SurfaceMTL(Context &context, void *metal_drawable)
Definition: surface_mtl.mm:12
impeller::interop
Definition: context_gles.cc:12
impeller
Definition: allocation.cc:12
std
Definition: comparable.h:95
surface_mtl.h
context_mtl.h
surface_mtl.h