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 
11 
12 using tonic::ToDart;
13 
14 namespace flutter {
15 
16 EngineLayer::EngineLayer(std::shared_ptr<flutter::ContainerLayer> layer)
17  : layer_(layer) {}
18 
19 EngineLayer::~EngineLayer() = default;
20 
22  // Provide an approximation of the total memory impact of this object to the
23  // Dart GC. The ContainerLayer may hold references to a tree of other layers,
24  // which in turn may contain Skia objects.
25  return 3000;
26 };
27 
29 
30 #define FOR_EACH_BINDING(V) // nothing to bind
31 
32 DART_BIND_ALL(EngineLayer, FOR_EACH_BINDING)
33 
34 } // namespace flutter
#define FOR_EACH_BINDING(V)
Definition: engine_layer.cc:30
#define DART_BIND_ALL(CLASS, FOR_EACH)
IMPLEMENT_WRAPPERTYPEINFO(ui, Scene)
size_t GetAllocationSize() const override
Definition: engine_layer.cc:21
~EngineLayer() override
Dart_Handle ToDart(const T &object)