Flutter Engine
The Flutter Engine
embedder_render_target.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/shell/platform/embedder/embedder_render_target.h"
6
7#include <optional>
8#include <utility>
9
10namespace flutter {
11
13 fml::closure on_release)
14 : backing_store_(backing_store), on_release_(std::move(on_release)) {
15 // TODO(38468): The optimization to elide backing store updates between frames
16 // has not been implemented yet.
17 backing_store_.did_update = true;
18}
19
21 if (on_release_) {
22 on_release_();
23 }
24}
25
27 return &backing_store_;
28}
29
30} // namespace flutter
virtual ~EmbedderRenderTarget()
Destroys this instance of the render target and invokes the callback for the embedder to release its ...
const FlutterBackingStore * GetBackingStore() const
The embedder backing store descriptor. This is the descriptor that was given to the engine by the emb...
EmbedderRenderTarget(FlutterBackingStore backing_store, fml::closure on_release)
Creates a render target whose backing store is managed by the embedder. The way this render target is...
std::function< void()> closure
Definition: closure.h:14
Definition: ref_ptr.h:256