Flutter Engine
The Flutter Engine
embedder_assertions.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_PLATFORM_EMBEDDER_TESTS_EMBEDDER_ASSERTIONS_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_ASSERTIONS_H_
7
8#include <sstream>
9
10#include "flutter/fml/logging.h"
11#include "flutter/shell/platform/embedder/embedder.h"
12#include "flutter/shell/platform/embedder/embedder_engine.h"
13#include "flutter/testing/assertions.h"
14#include "gtest/gtest.h"
17
18// NOLINTBEGIN(google-objc-function-naming)
19
20//------------------------------------------------------------------------------
21// Equality
22//------------------------------------------------------------------------------
23inline bool operator==(const FlutterPoint& a, const FlutterPoint& b) {
24 return flutter::testing::NumberNear(a.x, b.x) &&
26}
27
28inline bool operator==(const FlutterRect& a, const FlutterRect& b) {
29 return flutter::testing::NumberNear(a.left, b.left) &&
31 flutter::testing::NumberNear(a.right, b.right) &&
32 flutter::testing::NumberNear(a.bottom, b.bottom);
33}
34
35inline bool operator==(const FlutterSize& a, const FlutterSize& b) {
36 return flutter::testing::NumberNear(a.width, b.width) &&
37 flutter::testing::NumberNear(a.height, b.height);
38}
39
40inline bool operator==(const FlutterRoundedRect& a,
41 const FlutterRoundedRect& b) {
42 return a.rect == b.rect &&
43 a.upper_left_corner_radius == b.upper_left_corner_radius &&
44 a.upper_right_corner_radius == b.upper_right_corner_radius &&
45 a.lower_right_corner_radius == b.lower_right_corner_radius &&
46 a.lower_left_corner_radius == b.lower_left_corner_radius;
47}
48
50 const FlutterTransformation& b) {
51 return a.scaleX == b.scaleX && a.skewX == b.skewX && a.transX == b.transX &&
52 a.skewY == b.skewY && a.scaleY == b.scaleY && a.transY == b.transY &&
53 a.pers0 == b.pers0 && a.pers1 == b.pers1 && a.pers2 == b.pers2;
54}
55
57 const FlutterOpenGLTexture& b) {
58 return a.target == b.target && a.name == b.name && a.format == b.format &&
59 a.user_data == b.user_data &&
60 a.destruction_callback == b.destruction_callback;
61}
62
65 return a.target == b.target && a.name == b.name &&
66 a.user_data == b.user_data &&
67 a.destruction_callback == b.destruction_callback;
68}
69
70inline bool operator==(const FlutterMetalTexture& a,
71 const FlutterMetalTexture& b) {
72 return a.texture_id == b.texture_id && a.texture == b.texture;
73}
74
75inline bool operator==(const FlutterVulkanImage& a,
76 const FlutterVulkanImage& b) {
77 return a.image == b.image && a.format == b.format;
78}
79
82 return a.image == b.image;
83}
84
87 return a.texture == b.texture;
88}
89
92 if (!(a.type == b.type)) {
93 return false;
94 }
95
96 switch (a.type) {
98 return a.texture == b.texture;
100 return a.framebuffer == b.framebuffer;
101 }
102
103 return false;
104}
105
108 return a.allocation == b.allocation && a.row_bytes == b.row_bytes &&
109 a.height == b.height && a.user_data == b.user_data &&
110 a.destruction_callback == b.destruction_callback;
111}
112
115 return a.allocation == b.allocation && a.row_bytes == b.row_bytes &&
116 a.height == b.height && a.user_data == b.user_data &&
117 a.destruction_callback == b.destruction_callback &&
118 a.pixel_format == b.pixel_format;
119}
120
121inline bool operator==(const FlutterRegion& a, const FlutterRegion& b) {
122 if (a.struct_size != b.struct_size || a.rects_count != b.rects_count) {
123 return false;
124 }
125 for (size_t i = 0; i < a.rects_count; i++) {
126 if (!(a.rects[i] == b.rects[i])) {
127 return false;
128 }
129 }
130 return true;
131}
132
135 return a.struct_size == b.struct_size && *a.paint_region == *b.paint_region;
136}
137
139 const FlutterBackingStore& b) {
140 if (!(a.struct_size == b.struct_size && a.user_data == b.user_data &&
141 a.type == b.type && a.did_update == b.did_update)) {
142 return false;
143 }
144
145 switch (a.type) {
147 return a.open_gl == b.open_gl;
149 return a.software == b.software;
151 return a.metal == b.metal;
153 return a.vulkan == b.vulkan;
155 return a.software2 == b.software2;
156 }
157
158 return false;
159}
160
163 if (a.type != b.type) {
164 return false;
165 }
166
167 switch (a.type) {
169 return flutter::testing::NumberNear(a.opacity, b.opacity);
171 return a.clip_rect == b.clip_rect;
173 return a.clip_rounded_rect == b.clip_rounded_rect;
175 return a.transformation == b.transformation;
176 }
177
178 return false;
179}
180
182 const FlutterPlatformView& b) {
183 if (!(a.struct_size == b.struct_size && a.identifier == b.identifier &&
184 a.mutations_count == b.mutations_count)) {
185 return false;
186 }
187
188 for (size_t i = 0; i < a.mutations_count; ++i) {
189 if (!(*a.mutations[i] == *b.mutations[i])) {
190 return false;
191 }
192 }
193
194 return true;
195}
196
197inline bool operator==(const FlutterLayer& a, const FlutterLayer& b) {
198 if (!(a.struct_size == b.struct_size && a.type == b.type &&
199 a.offset == b.offset && a.size == b.size)) {
200 return false;
201 }
202
203 switch (a.type) {
205 return *a.backing_store == *b.backing_store &&
206 *a.backing_store_present_info == *b.backing_store_present_info;
208 return *a.platform_view == *b.platform_view;
209 }
210
211 return false;
212}
213
214//------------------------------------------------------------------------------
215// Printing
216//------------------------------------------------------------------------------
217
218inline std::ostream& operator<<(std::ostream& out, const FlutterPoint& point) {
219 return out << "(" << point.x << ", " << point.y << ")";
220}
221
222inline std::ostream& operator<<(std::ostream& out, const FlutterRect& r) {
223 return out << "LTRB (" << r.left << ", " << r.top << ", " << r.right << ", "
224 << r.bottom << ")";
225}
226
227inline std::ostream& operator<<(std::ostream& out, const FlutterSize& size) {
228 return out << "(" << size.width << ", " << size.height << ")";
229}
230
231inline std::ostream& operator<<(std::ostream& out,
232 const FlutterRoundedRect& r) {
233 out << "Rect: " << r.rect << ", ";
234 out << "Upper Left Corner Radius: " << r.upper_left_corner_radius << ", ";
235 out << "Upper Right Corner Radius: " << r.upper_right_corner_radius << ", ";
236 out << "Lower Right Corner Radius: " << r.lower_right_corner_radius << ", ";
237 out << "Lower Left Corner Radius: " << r.lower_left_corner_radius;
238 return out;
239}
240
241inline std::ostream& operator<<(std::ostream& out,
242 const FlutterTransformation& t) {
243 out << "Scale X: " << t.scaleX << ", ";
244 out << "Skew X: " << t.skewX << ", ";
245 out << "Trans X: " << t.transX << ", ";
246 out << "Skew Y: " << t.skewY << ", ";
247 out << "Scale Y: " << t.scaleY << ", ";
248 out << "Trans Y: " << t.transY << ", ";
249 out << "Pers 0: " << t.pers0 << ", ";
250 out << "Pers 1: " << t.pers1 << ", ";
251 out << "Pers 2: " << t.pers2;
252 return out;
253}
254
257 switch (type) {
259 return "kFlutterLayerContentTypeBackingStore";
261 return "kFlutterLayerContentTypePlatformView";
262 }
263 return "Unknown";
264}
265
268 switch (type) {
270 return "kFlutterBackingStoreTypeOpenGL";
272 return "kFlutterBackingStoreTypeSoftware";
274 return "kFlutterBackingStoreTypeMetal";
276 return "kFlutterBackingStoreTypeVulkan";
278 return "kFlutterBackingStoreTypeSoftware2";
279 }
280 return "Unknown";
281}
282
283inline std::ostream& operator<<(std::ostream& out,
284 const FlutterOpenGLTexture& item) {
285 return out << "(FlutterOpenGLTexture) Target: 0x" << std::hex << item.target
286 << std::dec << " Name: " << item.name << " Format: " << item.format
287 << " User Data: " << item.user_data << " Destruction Callback: "
288 << reinterpret_cast<void*>(item.destruction_callback);
289}
290
291inline std::ostream& operator<<(std::ostream& out,
292 const FlutterOpenGLFramebuffer& item) {
293 return out << "(FlutterOpenGLFramebuffer) Target: 0x" << std::hex
294 << item.target << std::dec << " Name: " << item.name
295 << " User Data: " << item.user_data << " Destruction Callback: "
296 << reinterpret_cast<void*>(item.destruction_callback);
297}
298
299inline std::ostream& operator<<(std::ostream& out,
300 const FlutterMetalTexture& item) {
301 return out << "(FlutterMetalTexture) Texture ID: " << std::hex
302 << item.texture_id << std::dec << " Handle: 0x" << std::hex
303 << item.texture;
304}
305
306inline std::ostream& operator<<(std::ostream& out,
307 const FlutterVulkanImage& item) {
308 return out << "(FlutterVulkanTexture) Image Handle: " << std::hex
309 << item.image << std::dec << " Format: " << item.format;
310}
311
314 switch (type) {
316 return "kFlutterPlatformViewMutationTypeOpacity";
318 return "kFlutterPlatformViewMutationTypeClipRect";
320 return "kFlutterPlatformViewMutationTypeClipRoundedRect";
322 return "kFlutterPlatformViewMutationTypeTransformation";
323 }
324 return "Unknown";
325}
326
327inline std::ostream& operator<<(std::ostream& out,
329 out << "(FlutterPlatformViewMutation) Type: "
331 switch (m.type) {
333 out << "Opacity: " << m.opacity;
335 out << "Clip Rect: " << m.clip_rect;
337 out << "Clip Rounded Rect: " << m.clip_rounded_rect;
339 out << "Transformation: " << m.transformation;
340 }
341 return out;
342}
343
344inline std::ostream& operator<<(std::ostream& out,
346 out << "["
347 << "(FlutterPlatformView) Struct Size: " << platform_view.struct_size
348 << " Identifier: " << platform_view.identifier
349 << " Mutations Count: " << platform_view.mutations_count;
350
351 if (platform_view.mutations_count > 0) {
352 out << std::endl;
353 for (size_t i = 0; i < platform_view.mutations_count; i++) {
354 out << "Mutation " << i << ": " << *platform_view.mutations[i]
355 << std::endl;
356 }
357 }
358
359 out << "]";
360
361 return out;
362}
363
366 switch (type) {
368 return "kFlutterOpenGLTargetTypeTexture";
370 return "kFlutterOpenGLTargetTypeFramebuffer";
371 }
372 return "Unknown";
373}
374
377 switch (pixfmt) {
379 return "kFlutterSoftwarePixelFormatGray8";
381 return "kFlutterSoftwarePixelFormatRGB565";
383 return "kFlutterSoftwarePixelFormatRGBA4444";
385 return "kFlutterSoftwarePixelFormatRGBA8888";
387 return "kFlutterSoftwarePixelFormatRGBX8888";
389 return "kFlutterSoftwarePixelFormatBGRA8888";
391 return "kFlutterSoftwarePixelFormatNative32";
392 default:
393 FML_LOG(ERROR) << "Invalid software rendering pixel format";
394 }
395 return "Unknown";
396}
397
398inline std::ostream& operator<<(std::ostream& out,
399 const FlutterOpenGLBackingStore& item) {
400 out << "(FlutterOpenGLBackingStore) Type: "
402 switch (item.type) {
404 out << item.texture;
405 break;
407 out << item.framebuffer;
408 break;
409 }
410 return out;
411}
412
413inline std::ostream& operator<<(std::ostream& out,
414 const FlutterSoftwareBackingStore& item) {
415 return out << "(FlutterSoftwareBackingStore) Allocation: " << item.allocation
416 << " Row Bytes: " << item.row_bytes << " Height: " << item.height
417 << " User Data: " << item.user_data << " Destruction Callback: "
418 << reinterpret_cast<void*>(item.destruction_callback);
419}
420
421inline std::ostream& operator<<(std::ostream& out,
422 const FlutterMetalBackingStore& item) {
423 return out << "(FlutterMetalBackingStore) Texture: " << item.texture;
424}
425
426inline std::ostream& operator<<(std::ostream& out,
427 const FlutterVulkanBackingStore& item) {
428 return out << "(FlutterVulkanBackingStore) Image: " << item.image;
429}
430
431inline std::ostream& operator<<(std::ostream& out,
432 const FlutterSoftwareBackingStore2& item) {
433 return out << "(FlutterSoftwareBackingStore2) Allocation: " << item.allocation
434 << " Row Bytes: " << item.row_bytes << " Height: " << item.height
435 << " User Data: " << item.user_data << " Destruction Callback: "
436 << reinterpret_cast<void*>(item.destruction_callback)
437 << " Pixel Format: "
439}
440
441inline std::ostream& operator<<(std::ostream& out,
442 const FlutterBackingStore& backing_store) {
443 out << "(FlutterBackingStore) Struct size: " << backing_store.struct_size
444 << " User Data: " << backing_store.user_data
445 << " Type: " << FlutterBackingStoreTypeToString(backing_store.type)
446 << " ";
447
448 switch (backing_store.type) {
450 out << backing_store.open_gl;
451 break;
452
454 out << backing_store.software;
455 break;
456
458 out << backing_store.metal;
459 break;
460
462 out << backing_store.vulkan;
463 break;
464
466 out << backing_store.software2;
467 break;
468 }
469
470 return out;
471}
472
473inline std::ostream& operator<<(std::ostream& out, const FlutterLayer& layer) {
474 out << "(Flutter Layer) Struct size: " << layer.struct_size
475 << " Type: " << FlutterLayerContentTypeToString(layer.type);
476
477 switch (layer.type) {
479 out << *layer.backing_store;
480 break;
482 out << *layer.platform_view;
483 break;
484 }
485
486 return out << " Offset: " << layer.offset << " Size: " << layer.size;
487}
488
489//------------------------------------------------------------------------------
490// Factories and Casts
491//------------------------------------------------------------------------------
492
493inline FlutterPoint FlutterPointMake(double x, double y) {
494 FlutterPoint point = {};
495 point.x = x;
496 point.y = y;
497 return point;
498}
499
500inline FlutterSize FlutterSizeMake(double width, double height) {
501 FlutterSize size = {};
502 size.width = width;
503 size.height = height;
504 return size;
505}
506
507inline FlutterSize FlutterSizeMake(const SkVector& vector) {
508 FlutterSize size = {};
509 size.width = vector.x();
510 size.height = vector.y();
511 return size;
512}
513
515 FlutterTransformation transformation = {};
516 transformation.scaleX = matrix[SkMatrix::kMScaleX];
517 transformation.skewX = matrix[SkMatrix::kMSkewX];
518 transformation.transX = matrix[SkMatrix::kMTransX];
519 transformation.skewY = matrix[SkMatrix::kMSkewY];
520 transformation.scaleY = matrix[SkMatrix::kMScaleY];
521 transformation.transY = matrix[SkMatrix::kMTransY];
522 transformation.pers0 = matrix[SkMatrix::kMPersp0];
523 transformation.pers1 = matrix[SkMatrix::kMPersp1];
524 transformation.pers2 = matrix[SkMatrix::kMPersp2];
525 return transformation;
526}
527
528inline SkMatrix SkMatrixMake(const FlutterTransformation& xformation) {
529 return SkMatrix::MakeAll(xformation.scaleX, //
530 xformation.skewX, //
531 xformation.transX, //
532 xformation.skewY, //
533 xformation.scaleY, //
534 xformation.transY, //
535 xformation.pers0, //
536 xformation.pers1, //
537 xformation.pers2 //
538 );
539}
540
542 return reinterpret_cast<flutter::EmbedderEngine*>(engine);
543}
544
546 FlutterRect r = {};
547 r.left = rect.left();
548 r.top = rect.top();
549 r.right = rect.right();
550 r.bottom = rect.bottom();
551 return r;
552}
553
554inline FlutterRect FlutterRectMakeLTRB(double l, double t, double r, double b) {
555 FlutterRect rect = {};
556 rect.left = l;
557 rect.top = t;
558 rect.right = r;
559 rect.bottom = b;
560 return rect;
561}
562
564 return SkRect::MakeLTRB(rect.left, rect.top, rect.right, rect.bottom);
565}
566
568 FlutterRoundedRect r = {};
569 r.rect = FlutterRectMake(rect.rect());
571 FlutterSizeMake(rect.radii(SkRRect::Corner::kUpperLeft_Corner));
573 FlutterSizeMake(rect.radii(SkRRect::Corner::kUpperRight_Corner));
575 FlutterSizeMake(rect.radii(SkRRect::Corner::kLowerRight_Corner));
577 FlutterSizeMake(rect.radii(SkRRect::Corner::kLowerLeft_Corner));
578 return r;
579}
580
581// NOLINTEND(google-objc-function-naming)
582
583#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_ASSERTIONS_H_
std::unique_ptr< flutter::PlatformViewIOS > platform_view
GLenum type
static constexpr int kMScaleX
horizontal scale factor
Definition: SkMatrix.h:353
static constexpr int kMTransY
vertical translation
Definition: SkMatrix.h:358
static constexpr int kMPersp1
input y perspective factor
Definition: SkMatrix.h:360
static SkMatrix MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, SkScalar skewY, SkScalar scaleY, SkScalar transY, SkScalar pers0, SkScalar pers1, SkScalar pers2)
Definition: SkMatrix.h:179
static constexpr int kMPersp0
input x perspective factor
Definition: SkMatrix.h:359
static constexpr int kMPersp2
perspective bias
Definition: SkMatrix.h:361
static constexpr int kMTransX
horizontal translation
Definition: SkMatrix.h:355
static constexpr int kMSkewY
vertical skew factor
Definition: SkMatrix.h:356
static constexpr int kMScaleY
vertical scale factor
Definition: SkMatrix.h:357
static constexpr int kMSkewX
horizontal skew factor
Definition: SkMatrix.h:354
FlutterLayerContentType
Definition: embedder.h:1790
@ kFlutterLayerContentTypePlatformView
Indicates that the contents of this layer are determined by the embedder.
Definition: embedder.h:1795
@ kFlutterLayerContentTypeBackingStore
Definition: embedder.h:1793
FlutterPlatformViewMutationType
Definition: embedder.h:1688
@ kFlutterPlatformViewMutationTypeClipRoundedRect
Definition: embedder.h:1697
@ kFlutterPlatformViewMutationTypeClipRect
Definition: embedder.h:1694
@ kFlutterPlatformViewMutationTypeTransformation
Definition: embedder.h:1700
@ kFlutterPlatformViewMutationTypeOpacity
Definition: embedder.h:1691
FlutterSoftwarePixelFormat
Definition: embedder.h:335
@ kFlutterSoftwarePixelFormatRGBA4444
Definition: embedder.h:347
@ kFlutterSoftwarePixelFormatRGBA8888
Definition: embedder.h:351
@ kFlutterSoftwarePixelFormatBGRA8888
Definition: embedder.h:359
@ kFlutterSoftwarePixelFormatGray8
Definition: embedder.h:339
@ kFlutterSoftwarePixelFormatNative32
Definition: embedder.h:363
@ kFlutterSoftwarePixelFormatRGBX8888
Definition: embedder.h:355
@ kFlutterSoftwarePixelFormatRGB565
Definition: embedder.h:343
FlutterOpenGLTargetType
Definition: embedder.h:300
@ kFlutterOpenGLTargetTypeFramebuffer
Definition: embedder.h:306
@ kFlutterOpenGLTargetTypeTexture
Definition: embedder.h:303
FlutterBackingStoreType
Definition: embedder.h:1739
@ kFlutterBackingStoreTypeSoftware2
Definition: embedder.h:1751
@ kFlutterBackingStoreTypeMetal
Specifies a Metal backing store. This is backed by a Metal texture.
Definition: embedder.h:1746
@ kFlutterBackingStoreTypeVulkan
Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
Definition: embedder.h:1748
@ kFlutterBackingStoreTypeSoftware
Specified an software allocation for Flutter to render into using the CPU.
Definition: embedder.h:1744
@ kFlutterBackingStoreTypeOpenGL
Definition: embedder.h:1742
std::string FlutterSoftwarePixelFormatToString(FlutterSoftwarePixelFormat pixfmt)
bool operator==(const FlutterPoint &a, const FlutterPoint &b)
FlutterSize FlutterSizeMake(double width, double height)
FlutterTransformation FlutterTransformationMake(const SkMatrix &matrix)
std::string FlutterOpenGLTargetTypeToString(FlutterOpenGLTargetType type)
std::ostream & operator<<(std::ostream &out, const FlutterPoint &point)
FlutterRect FlutterRectMake(const SkRect &rect)
SkMatrix SkMatrixMake(const FlutterTransformation &xformation)
std::string FlutterPlatformViewMutationTypeToString(FlutterPlatformViewMutationType type)
std::string FlutterBackingStoreTypeToString(FlutterBackingStoreType type)
FlutterRect FlutterRectMakeLTRB(double l, double t, double r, double b)
FlutterPoint FlutterPointMake(double x, double y)
SkRect SkRectMake(const FlutterRect &rect)
std::string FlutterLayerContentTypeToString(FlutterLayerContentType type)
flutter::EmbedderEngine * ToEmbedderEngine(const FlutterEngine &engine)
FlutterRoundedRect FlutterRoundedRectMake(const SkRRect &rect)
FlutterEngine engine
Definition: main.cc:68
static bool b
struct MyStruct a[10]
#define FML_LOG(severity)
Definition: logging.h:82
double y
double x
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
bool NumberNear(double a, double b)
Definition: assertions.h:13
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
int32_t height
int32_t width
FlutterVulkanBackingStore vulkan
Definition: embedder.h:1776
FlutterMetalBackingStore metal
Definition: embedder.h:1774
FlutterBackingStoreType type
Specifies the type of backing store.
Definition: embedder.h:1762
FlutterOpenGLBackingStore open_gl
The description of the OpenGL backing store.
Definition: embedder.h:1768
FlutterSoftwareBackingStore software
The description of the software backing store.
Definition: embedder.h:1770
FlutterSoftwareBackingStore2 software2
The description of the software backing store.
Definition: embedder.h:1772
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStore).
Definition: embedder.h:1756
FlutterPoint offset
Definition: embedder.h:1835
FlutterLayerContentType type
Definition: embedder.h:1824
const FlutterBackingStore * backing_store
Definition: embedder.h:1828
const FlutterPlatformView * platform_view
Definition: embedder.h:1831
size_t struct_size
This size of this struct. Must be sizeof(FlutterLayer).
Definition: embedder.h:1821
FlutterSize size
The size of the layer (in physical pixels).
Definition: embedder.h:1837
FlutterMetalTexture texture
Definition: embedder.h:1665
FlutterMetalTextureHandle texture
Definition: embedder.h:661
int64_t texture_id
Definition: embedder.h:656
FlutterOpenGLTexture texture
A texture for Flutter to render into.
Definition: embedder.h:1613
FlutterOpenGLTargetType type
Definition: embedder.h:1610
FlutterOpenGLFramebuffer framebuffer
Definition: embedder.h:1616
uint32_t name
The name of the framebuffer.
Definition: embedder.h:396
VoidCallback destruction_callback
Definition: embedder.h:403
void * user_data
User data to be returned on the invocation of the destruction callback.
Definition: embedder.h:399
uint32_t name
The name of the texture.
Definition: embedder.h:371
VoidCallback destruction_callback
Definition: embedder.h:378
void * user_data
User data to be returned on the invocation of the destruction callback.
Definition: embedder.h:375
uint32_t format
The texture format (example GL_RGBA8).
Definition: embedder.h:373
A structure to represent a 2D point.
Definition: embedder.h:445
double y
Definition: embedder.h:447
double x
Definition: embedder.h:446
A structure to represent a rectangle.
Definition: embedder.h:437
double bottom
Definition: embedder.h:441
double top
Definition: embedder.h:439
double left
Definition: embedder.h:438
double right
Definition: embedder.h:440
A region represented by a collection of non-overlapping rectangles.
Definition: embedder.h:1799
A structure to represent a rounded rectangle.
Definition: embedder.h:451
FlutterRect rect
Definition: embedder.h:452
FlutterSize upper_left_corner_radius
Definition: embedder.h:453
FlutterSize lower_left_corner_radius
Definition: embedder.h:456
FlutterSize upper_right_corner_radius
Definition: embedder.h:454
FlutterSize lower_right_corner_radius
Definition: embedder.h:455
A structure to represent the width and height.
Definition: embedder.h:423
VoidCallback destruction_callback
Definition: embedder.h:1652
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition: embedder.h:1643
size_t height
The number of rows in the allocation.
Definition: embedder.h:1645
FlutterSoftwarePixelFormat pixel_format
Definition: embedder.h:1655
VoidCallback destruction_callback
Definition: embedder.h:1634
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition: embedder.h:1625
size_t height
The number of rows in the allocation.
Definition: embedder.h:1627
double transY
vertical translation
Definition: embedder.h:289
double pers2
perspective scale factor
Definition: embedder.h:295
double skewX
horizontal skew factor
Definition: embedder.h:281
double pers0
input x-axis perspective factor
Definition: embedder.h:291
double scaleX
horizontal scale factor
Definition: embedder.h:279
double skewY
vertical skew factor
Definition: embedder.h:285
double scaleY
vertical scale factor
Definition: embedder.h:287
double pers1
input y-axis perspective factor
Definition: embedder.h:293
double transX
horizontal translation
Definition: embedder.h:283
const FlutterVulkanImage * image
Definition: embedder.h:1678
FlutterVulkanImageHandle image
Definition: embedder.h:727
uint32_t format
The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
Definition: embedder.h:729
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Definition: SkRect.h:646
#define ERROR(message)
Definition: elf_loader.cc:260