Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/ui/painting/engine_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ namespace blink {

EngineLayer::~EngineLayer() = default;

size_t EngineLayer::GetAllocationSize() {
// Provide an approximation of the total memory impact of this object to the
// Dart GC. The ContainerLayer may hold references to a tree of other layers,
// which in turn may contain Skia objects.
return 3000;
};

IMPLEMENT_WRAPPERTYPEINFO(ui, EngineLayer);

#define FOR_EACH_BINDING(V) // nothing to bind
Expand Down
3 changes: 3 additions & 0 deletions lib/ui/painting/engine_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class EngineLayer : public RefCountedDartWrappable<EngineLayer> {

public:
~EngineLayer() override;

size_t GetAllocationSize() override;

static fml::RefPtr<EngineLayer> MakeRetained(
std::shared_ptr<flow::ContainerLayer> layer) {
return fml::MakeRefCounted<EngineLayer>(layer);
Expand Down