Flutter Engine
engine_layer.cc
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 "flutter/lib/ui/painting/engine_layer.h"
6 
7 #include "flutter/lib/ui/ui_dart_state.h"
12 
13 using tonic::ToDart;
14 
15 namespace flutter {
16 
17 IMPLEMENT_WRAPPERTYPEINFO(ui, EngineLayer);
18 
19 #define FOR_EACH_BINDING(V) V(EngineLayer, dispose)
20 
21 DART_BIND_ALL(EngineLayer, FOR_EACH_BINDING)
22 
23 EngineLayer::EngineLayer(std::shared_ptr<flutter::ContainerLayer> layer)
24  : layer_(layer) {}
25 
26 EngineLayer::~EngineLayer() = default;
27 
28 void EngineLayer::dispose() {
29  layer_.reset();
30  ClearDartWrapper();
31 }
32 
33 } // namespace flutter
#define FOR_EACH_BINDING(V)
Definition: engine_layer.cc:19
#define DART_BIND_ALL(CLASS, FOR_EACH)
IMPLEMENT_WRAPPERTYPEINFO(ui, Scene)
Dart_Handle ToDart(const T &object)