#include <embedder_surface_software.h>
Definition at line 17 of file embedder_surface_software.h.
◆ EmbedderSurfaceSoftware()
Definition at line 18 of file embedder_surface_software.cc.
21 : software_dispatch_table_(std::move(software_dispatch_table)),
22 external_view_embedder_(std::move(external_view_embedder)) {
24 return;
25 }
26 valid_ = true;
27}
std::function< bool(const void *allocation, size_t row_bytes, size_t height)> software_present_backing_store
◆ ~EmbedderSurfaceSoftware()
flutter::EmbedderSurfaceSoftware::~EmbedderSurfaceSoftware |
( |
| ) |
|
|
overridedefault |
◆ AcquireBackingStore()
Called when the GPU surface needs a new buffer to render a new frame into.
- Parameters
-
[in] | size | The size of the frame. |
- Returns
- A raster surface returned by the platform.
Implements flutter::GPUSurfaceSoftwareDelegate.
Definition at line 57 of file embedder_surface_software.cc.
58 {
59 TRACE_EVENT0(
"flutter",
"EmbedderSurfaceSoftware::AcquireBackingStore");
62 << "Could not acquire backing store for the software surface.";
63 return nullptr;
64 }
65
66 if (sk_surface_ != nullptr &&
68
69 return sk_surface_;
70 }
71
75
76 if (sk_surface_ == nullptr) {
77 FML_LOG(
ERROR) <<
"Could not create backing store for software rendering.";
78 return nullptr;
79 }
80
81 return sk_surface_;
82}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static sk_sp< SkColorSpace > MakeSRGB()
bool IsValid() const override
#define FML_LOG(severity)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
#define TRACE_EVENT0(category_group, name)
◆ CreateGPUSurface()
std::unique_ptr< Surface > flutter::EmbedderSurfaceSoftware::CreateGPUSurface |
( |
| ) |
|
|
overrideprivatevirtual |
◆ CreateResourceContext()
◆ IsValid()
bool flutter::EmbedderSurfaceSoftware::IsValid |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ PresentBackingStore()
bool flutter::EmbedderSurfaceSoftware::PresentBackingStore |
( |
sk_sp< SkSurface > |
backing_store | ) |
|
|
overrideprivatevirtual |
Called by the platform when a frame has been rendered into the backing store and the platform must display it on-screen.
- Parameters
-
[in] | backing_store | The software backing store to present. |
- Returns
- Returns if the platform could present the backing store onto the screen.
Implements flutter::GPUSurfaceSoftwareDelegate.
Definition at line 85 of file embedder_surface_software.cc.
86 {
88 FML_LOG(
ERROR) <<
"Tried to present an invalid software surface.";
89 return false;
90 }
91
94 FML_LOG(
ERROR) <<
"Could not peek the pixels of the backing store.";
95 return false;
96 }
97
98
99 uint64_t expected_pixmap_data_size = pixmap.
width() * pixmap.
height() * 4;
100
102
103 if (expected_pixmap_data_size != pixmap_size) {
104 FML_LOG(
ERROR) <<
"Software backing store had unexpected size.";
105 return false;
106 }
107
112 );
113}
size_t computeByteSize() const
const void * addr() const
bool peekPixels(SkPixmap *pixmap)
The documentation for this class was generated from the following files: