Flutter Engine
The Flutter Engine
gpu_surface_software_delegate.h
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#ifndef FLUTTER_SHELL_GPU_GPU_SURFACE_SOFTWARE_DELEGATE_H_
6#define FLUTTER_SHELL_GPU_GPU_SURFACE_SOFTWARE_DELEGATE_H_
7
8#include "flutter/flow/embedded_views.h"
9#include "flutter/fml/macros.h"
11
12namespace flutter {
13
14//------------------------------------------------------------------------------
15/// @brief Interface implemented by all platform surfaces that can present
16/// a software backing store to the "screen". The GPU surface
17/// abstraction (which abstracts the client rendering API) uses this
18/// delegation pattern to tell the platform surface (which abstracts
19/// how backing stores fulfilled by the selected client rendering
20/// API end up on the "screen" on a particular platform) when the
21/// rasterizer needs to allocate and present the software backing
22/// store.
23///
24/// @see |IOSSurfaceSoftware|, |AndroidSurfaceSoftware|,
25/// |EmbedderSurfaceSoftware|.
26///
28 public:
30
31 //----------------------------------------------------------------------------
32 /// @brief Called when the GPU surface needs a new buffer to render a new
33 /// frame into.
34 ///
35 /// @param[in] size The size of the frame.
36 ///
37 /// @return A raster surface returned by the platform.
38 ///
40
41 //----------------------------------------------------------------------------
42 /// @brief Called by the platform when a frame has been rendered into the
43 /// backing store and the platform must display it on-screen.
44 ///
45 /// @param[in] backing_store The software backing store to present.
46 ///
47 /// @return Returns if the platform could present the backing store onto
48 /// the screen.
49 ///
50 virtual bool PresentBackingStore(sk_sp<SkSurface> backing_store) = 0;
51};
52
53} // namespace flutter
54
55#endif // FLUTTER_SHELL_GPU_GPU_SURFACE_SOFTWARE_DELEGATE_H_
Interface implemented by all platform surfaces that can present a software backing store to the "scre...
virtual sk_sp< SkSurface > AcquireBackingStore(const SkISize &size)=0
Called when the GPU surface needs a new buffer to render a new frame into.
virtual bool PresentBackingStore(sk_sp< SkSurface > backing_store)=0
Called by the platform when a frame has been rendered into the backing store and the platform must di...
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
Definition: SkSize.h:16