#include <ios_surface_software.h>
Definition at line 21 of file ios_surface_software.h.
◆ IOSSurfaceSoftware()
◆ ~IOSSurfaceSoftware()
flutter::IOSSurfaceSoftware::~IOSSurfaceSoftware |
( |
| ) |
|
|
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 53 of file ios_surface_software.mm.
53 {
54 TRACE_EVENT0(
"flutter",
"IOSSurfaceSoftware::AcquireBackingStore");
56 return nullptr;
57 }
58
59 if (sk_surface_ != nullptr &&
61
62 return sk_surface_;
63 }
64
68 return sk_surface_;
69}
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
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::IOSSurfaceSoftware::CreateGPUSurface |
( |
GrDirectContext * |
gr_context = nullptr | ) |
|
|
overridevirtual |
◆ IsValid()
bool flutter::IOSSurfaceSoftware::IsValid |
( |
| ) |
const |
|
overridevirtual |
◆ PresentBackingStore()
bool flutter::IOSSurfaceSoftware::PresentBackingStore |
( |
sk_sp< SkSurface > |
backing_store | ) |
|
|
overridevirtual |
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 71 of file ios_surface_software.mm.
71 {
72 TRACE_EVENT0(
"flutter",
"IOSSurfaceSoftware::PresentBackingStore");
73 if (!
IsValid() || backing_store ==
nullptr) {
74 return false;
75 }
76
79 return false;
80 }
81
82
83 uint64_t expected_pixmap_data_size = pixmap.
width() * pixmap.
height() * 4;
84
86
87 if (expected_pixmap_data_size != pixmap_size) {
88 return false;
89 }
90
92
93
95 nullptr,
97 pixmap_size,
98 nullptr
99 ));
100
101 if (!pixmap_data_provider) {
102 return false;
103 }
104
105
108 8,
109 32,
111 colorspace,
112 kCGImageAlphaPremultipliedLast,
113 pixmap_data_provider,
114 nullptr,
115 false,
116 kCGRenderingIntentDefault
117 ));
118
119 if (!pixmap_image) {
120 return false;
121 }
122
123 layer_.
get().contents = (__bridge
id)(
static_cast<CGImageRef
>(pixmap_image));
124
125 return true;
126}
const uint32_t * addr32() const
size_t computeByteSize() const
bool peekPixels(SkPixmap *pixmap)
T get() const __attribute((ns_returns_not_retained))
◆ UpdateStorageSizeIfNecessary()
void flutter::IOSSurfaceSoftware::UpdateStorageSizeIfNecessary |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: