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 "third_party/tonic/converter/dart_converter.h"
8#include "third_party/tonic/dart_args.h"
9#include "third_party/tonic/dart_binding_macros.h"
10#include "third_party/tonic/dart_library_natives.h"
11
12using tonic::ToDart;
13
14namespace flutter {
15
16EngineLayer::EngineLayer(std::shared_ptr<flutter::ContainerLayer> layer)
17 : layer_(layer) {}
18
19EngineLayer::~EngineLayer() = default;
20
21size_t EngineLayer::GetAllocationSize() const {
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
28IMPLEMENT_WRAPPERTYPEINFO(ui, EngineLayer);
29
30#define FOR_EACH_BINDING(V) // nothing to bind
31
32DART_BIND_ALL(EngineLayer, FOR_EACH_BINDING)
33
34} // namespace flutter
35