Flutter Engine
The Flutter Engine
embedder_render_target_impeller.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_impeller.h"
6
7#include "flutter/fml/logging.h"
8#include "flutter/impeller/renderer/render_target.h"
9
10namespace flutter {
11
13 FlutterBackingStore backing_store,
14 std::shared_ptr<impeller::AiksContext> aiks_context,
15 std::unique_ptr<impeller::RenderTarget> impeller_target,
16 fml::closure on_release,
17 fml::closure framebuffer_destruction_callback)
18 : EmbedderRenderTarget(backing_store, std::move(on_release)),
19 aiks_context_(std::move(aiks_context)),
20 impeller_target_(std::move(impeller_target)),
21 framebuffer_destruction_callback_(
22 std::move(framebuffer_destruction_callback)) {
23 FML_DCHECK(aiks_context_);
24 FML_DCHECK(impeller_target_);
25}
26
28 if (framebuffer_destruction_callback_) {
29 framebuffer_destruction_callback_();
30 }
31}
32
34 return nullptr;
35}
36
38 const {
39 return impeller_target_.get();
40}
41
42std::shared_ptr<impeller::AiksContext>
44 return aiks_context_;
45}
46
48 auto size = impeller_target_->GetRenderTargetSize();
49 return SkISize::Make(size.width, size.height);
50}
51
52} // namespace flutter
sk_sp< SkSurface > GetSkiaSurface() const override
A render surface the rasterizer can use to draw into the backing store of this render target.
impeller::RenderTarget * GetImpellerRenderTarget() const override
An impeller render target the rasterizer can use to draw into the backing store.
SkISize GetRenderTargetSize() const override
Returns the size of the render target.
std::shared_ptr< impeller::AiksContext > GetAiksContext() const override
Returns the AiksContext that should be used for rendering, if this render target is backed by Impelle...
EmbedderRenderTargetImpeller(FlutterBackingStore backing_store, std::shared_ptr< impeller::AiksContext > aiks_context, std::unique_ptr< impeller::RenderTarget > impeller_target, fml::closure on_release, fml::closure framebuffer_destruction_callback)
Describes a surface whose backing store is managed by the embedder. The type of surface depends on th...
#define FML_DCHECK(condition)
Definition: logging.h:103
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
std::function< void()> closure
Definition: closure.h:14
Definition: ref_ptr.h:256
Definition: SkSize.h:16
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20