Flutter Engine
 
Loading...
Searching...
No Matches
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"
14#include "gtest/gtest.h"
15#include "third_party/skia/include/core/SkPoint.h"
16#include "third_party/skia/include/core/SkSize.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) &&
33}
34
35inline bool operator==(const FlutterSize& a, const FlutterSize& b) {
36 return flutter::testing::NumberNear(a.width, b.width) &&
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
49inline bool operator==(const FlutterTransformation& a,
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
56inline bool operator==(const FlutterOpenGLTexture& a,
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
64 const FlutterOpenGLFramebuffer& b) {
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 FlutterOpenGLSurface& a,
71 const FlutterOpenGLSurface& b) {
72 return a.make_current_callback == b.make_current_callback &&
73 a.user_data == b.user_data && a.format == b.format &&
74 a.destruction_callback == b.destruction_callback;
75}
76
77inline bool operator==(const FlutterMetalTexture& a,
78 const FlutterMetalTexture& b) {
79 return a.texture_id == b.texture_id && a.texture == b.texture;
80}
81
82inline bool operator==(const FlutterVulkanImage& a,
83 const FlutterVulkanImage& b) {
84 return a.image == b.image && a.format == b.format;
85}
86
89 return a.image == b.image;
90}
91
93 const FlutterMetalBackingStore& b) {
94 return a.texture == b.texture;
95}
96
99 if (!(a.type == b.type)) {
100 return false;
101 }
102
103 switch (a.type) {
105 return a.texture == b.texture;
107 return a.framebuffer == b.framebuffer;
109 return a.surface == b.surface;
110 }
111
112 return false;
113}
114
117 return a.allocation == b.allocation && a.row_bytes == b.row_bytes &&
118 a.height == b.height && a.user_data == b.user_data &&
119 a.destruction_callback == b.destruction_callback;
120}
121
124 return a.allocation == b.allocation && a.row_bytes == b.row_bytes &&
125 a.height == b.height && a.user_data == b.user_data &&
126 a.destruction_callback == b.destruction_callback &&
127 a.pixel_format == b.pixel_format;
128}
129
130inline bool operator==(const FlutterRegion& a, const FlutterRegion& b) {
131 if (a.struct_size != b.struct_size || a.rects_count != b.rects_count) {
132 return false;
133 }
134 for (size_t i = 0; i < a.rects_count; i++) {
135 if (!(a.rects[i] == b.rects[i])) {
136 return false;
137 }
138 }
139 return true;
140}
141
144 return a.struct_size == b.struct_size && *a.paint_region == *b.paint_region;
145}
146
147inline bool operator==(const FlutterBackingStore& a,
148 const FlutterBackingStore& b) {
149 if (!(a.struct_size == b.struct_size && a.user_data == b.user_data &&
150 a.type == b.type && a.did_update == b.did_update)) {
151 return false;
152 }
153
154 switch (a.type) {
156 return a.open_gl == b.open_gl;
158 return a.software == b.software;
160 return a.metal == b.metal;
162 return a.vulkan == b.vulkan;
164 return a.software2 == b.software2;
165 }
166
167 return false;
168}
169
172 if (a.type != b.type) {
173 return false;
174 }
175
176 switch (a.type) {
178 return flutter::testing::NumberNear(a.opacity, b.opacity);
180 return a.clip_rect == b.clip_rect;
182 return a.clip_rounded_rect == b.clip_rounded_rect;
184 return a.transformation == b.transformation;
185 }
186
187 return false;
188}
189
190inline bool operator==(const FlutterPlatformView& a,
191 const FlutterPlatformView& b) {
192 if (!(a.struct_size == b.struct_size && a.identifier == b.identifier &&
193 a.mutations_count == b.mutations_count)) {
194 return false;
195 }
196
197 for (size_t i = 0; i < a.mutations_count; ++i) {
198 if (!(*a.mutations[i] == *b.mutations[i])) {
199 return false;
200 }
201 }
202
203 return true;
204}
205
206inline bool operator==(const FlutterLayer& a, const FlutterLayer& b) {
207 if (!(a.struct_size == b.struct_size && a.type == b.type &&
208 a.offset == b.offset && a.size == b.size)) {
209 return false;
210 }
211
212 switch (a.type) {
214 return *a.backing_store == *b.backing_store &&
215 *a.backing_store_present_info == *b.backing_store_present_info;
217 return *a.platform_view == *b.platform_view;
218 }
219
220 return false;
221}
222
223//------------------------------------------------------------------------------
224// Printing
225//------------------------------------------------------------------------------
226
227inline std::ostream& operator<<(std::ostream& out, const FlutterPoint& point) {
228 return out << "(" << point.x << ", " << point.y << ")";
229}
230
231inline std::ostream& operator<<(std::ostream& out, const FlutterRect& r) {
232 return out << "LTRB (" << r.left << ", " << r.top << ", " << r.right << ", "
233 << r.bottom << ")";
234}
235
236inline std::ostream& operator<<(std::ostream& out, const FlutterSize& size) {
237 return out << "(" << size.width << ", " << size.height << ")";
238}
239
240inline std::ostream& operator<<(std::ostream& out,
241 const FlutterRoundedRect& r) {
242 out << "Rect: " << r.rect << ", ";
243 out << "Upper Left Corner Radius: " << r.upper_left_corner_radius << ", ";
244 out << "Upper Right Corner Radius: " << r.upper_right_corner_radius << ", ";
245 out << "Lower Right Corner Radius: " << r.lower_right_corner_radius << ", ";
246 out << "Lower Left Corner Radius: " << r.lower_left_corner_radius;
247 return out;
248}
249
250inline std::ostream& operator<<(std::ostream& out,
251 const FlutterTransformation& t) {
252 out << "Scale X: " << t.scaleX << ", ";
253 out << "Skew X: " << t.skewX << ", ";
254 out << "Trans X: " << t.transX << ", ";
255 out << "Skew Y: " << t.skewY << ", ";
256 out << "Scale Y: " << t.scaleY << ", ";
257 out << "Trans Y: " << t.transY << ", ";
258 out << "Pers 0: " << t.pers0 << ", ";
259 out << "Pers 1: " << t.pers1 << ", ";
260 out << "Pers 2: " << t.pers2;
261 return out;
262}
263
266 switch (type) {
268 return "kFlutterLayerContentTypeBackingStore";
270 return "kFlutterLayerContentTypePlatformView";
271 }
272 return "Unknown";
273}
274
277 switch (type) {
279 return "kFlutterBackingStoreTypeOpenGL";
281 return "kFlutterBackingStoreTypeSoftware";
283 return "kFlutterBackingStoreTypeMetal";
285 return "kFlutterBackingStoreTypeVulkan";
287 return "kFlutterBackingStoreTypeSoftware2";
288 }
289 return "Unknown";
290}
291
292inline std::ostream& operator<<(std::ostream& out,
293 const FlutterOpenGLTexture& item) {
294 return out << "(FlutterOpenGLTexture) Target: 0x" << std::hex << item.target
295 << std::dec << " Name: " << item.name << " Format: " << item.format
296 << " User Data: " << item.user_data << " Destruction Callback: "
297 << reinterpret_cast<void*>(item.destruction_callback);
298}
299
300inline std::ostream& operator<<(std::ostream& out,
301 const FlutterOpenGLFramebuffer& item) {
302 return out << "(FlutterOpenGLFramebuffer) Target: 0x" << std::hex
303 << item.target << std::dec << " Name: " << item.name
304 << " User Data: " << item.user_data << " Destruction Callback: "
305 << reinterpret_cast<void*>(item.destruction_callback);
306}
307
308inline std::ostream& operator<<(std::ostream& out,
309 const FlutterOpenGLSurface& item) {
310 return out << "(FlutterOpenGLSurface) Make Current Callback: "
311 << reinterpret_cast<void*>(item.make_current_callback)
312 << " User Data: " << item.user_data << "Format: " << item.format
313 << " Destruction Callback: "
314 << reinterpret_cast<void*>(item.destruction_callback);
315}
316
317inline std::ostream& operator<<(std::ostream& out,
318 const FlutterMetalTexture& item) {
319 return out << "(FlutterMetalTexture) Texture ID: " << std::hex
320 << item.texture_id << std::dec << " Handle: 0x" << std::hex
321 << item.texture;
322}
323
324inline std::ostream& operator<<(std::ostream& out,
325 const FlutterVulkanImage& item) {
326 return out << "(FlutterVulkanTexture) Image Handle: " << std::hex
327 << item.image << std::dec << " Format: " << item.format;
328}
329
332 switch (type) {
334 return "kFlutterPlatformViewMutationTypeOpacity";
336 return "kFlutterPlatformViewMutationTypeClipRect";
338 return "kFlutterPlatformViewMutationTypeClipRoundedRect";
340 return "kFlutterPlatformViewMutationTypeTransformation";
341 }
342 return "Unknown";
343}
344
345inline std::ostream& operator<<(std::ostream& out,
347 out << "(FlutterPlatformViewMutation) Type: "
349 switch (m.type) {
351 out << "Opacity: " << m.opacity;
353 out << "Clip Rect: " << m.clip_rect;
355 out << "Clip Rounded Rect: " << m.clip_rounded_rect;
357 out << "Transformation: " << m.transformation;
358 }
359 return out;
360}
361
362inline std::ostream& operator<<(std::ostream& out,
364 out << "["
365 << "(FlutterPlatformView) Struct Size: " << platform_view.struct_size
366 << " Identifier: " << platform_view.identifier
367 << " Mutations Count: " << platform_view.mutations_count;
368
369 if (platform_view.mutations_count > 0) {
370 out << std::endl;
371 for (size_t i = 0; i < platform_view.mutations_count; i++) {
372 out << "Mutation " << i << ": " << *platform_view.mutations[i]
373 << std::endl;
374 }
375 }
376
377 out << "]";
378
379 return out;
380}
381
384 switch (type) {
386 return "kFlutterOpenGLTargetTypeTexture";
388 return "kFlutterOpenGLTargetTypeFramebuffer";
390 return "kFlutterOpenGLTargetTypeSurface";
391 }
392 return "Unknown";
393}
394
397 switch (pixfmt) {
399 return "kFlutterSoftwarePixelFormatGray8";
401 return "kFlutterSoftwarePixelFormatRGB565";
403 return "kFlutterSoftwarePixelFormatRGBA4444";
405 return "kFlutterSoftwarePixelFormatRGBA8888";
407 return "kFlutterSoftwarePixelFormatRGBX8888";
409 return "kFlutterSoftwarePixelFormatBGRA8888";
411 return "kFlutterSoftwarePixelFormatNative32";
412 default:
413 FML_LOG(ERROR) << "Invalid software rendering pixel format";
414 }
415 return "Unknown";
416}
417
418inline std::ostream& operator<<(std::ostream& out,
419 const FlutterOpenGLBackingStore& item) {
420 out << "(FlutterOpenGLBackingStore) Type: "
422 switch (item.type) {
424 out << item.texture;
425 break;
427 out << item.framebuffer;
428 break;
430 out << item.surface;
431 break;
432 }
433 return out;
434}
435
436inline std::ostream& operator<<(std::ostream& out,
437 const FlutterSoftwareBackingStore& item) {
438 return out << "(FlutterSoftwareBackingStore) Allocation: " << item.allocation
439 << " Row Bytes: " << item.row_bytes << " Height: " << item.height
440 << " User Data: " << item.user_data << " Destruction Callback: "
441 << reinterpret_cast<void*>(item.destruction_callback);
442}
443
444inline std::ostream& operator<<(std::ostream& out,
445 const FlutterMetalBackingStore& item) {
446 return out << "(FlutterMetalBackingStore) Texture: " << item.texture;
447}
448
449inline std::ostream& operator<<(std::ostream& out,
450 const FlutterVulkanBackingStore& item) {
451 return out << "(FlutterVulkanBackingStore) Image: " << item.image;
452}
453
454inline std::ostream& operator<<(std::ostream& out,
455 const FlutterSoftwareBackingStore2& item) {
456 return out << "(FlutterSoftwareBackingStore2) Allocation: " << item.allocation
457 << " Row Bytes: " << item.row_bytes << " Height: " << item.height
458 << " User Data: " << item.user_data << " Destruction Callback: "
459 << reinterpret_cast<void*>(item.destruction_callback)
460 << " Pixel Format: "
462}
463
464inline std::ostream& operator<<(std::ostream& out,
465 const FlutterBackingStore& backing_store) {
466 out << "(FlutterBackingStore) Struct size: " << backing_store.struct_size
467 << " User Data: " << backing_store.user_data
468 << " Type: " << FlutterBackingStoreTypeToString(backing_store.type)
469 << " ";
470
471 switch (backing_store.type) {
473 out << backing_store.open_gl;
474 break;
475
477 out << backing_store.software;
478 break;
479
481 out << backing_store.metal;
482 break;
483
485 out << backing_store.vulkan;
486 break;
487
489 out << backing_store.software2;
490 break;
491 }
492
493 return out;
494}
495
496inline std::ostream& operator<<(std::ostream& out, const FlutterLayer& layer) {
497 out << "(Flutter Layer) Struct size: " << layer.struct_size
498 << " Type: " << FlutterLayerContentTypeToString(layer.type);
499
500 switch (layer.type) {
502 out << *layer.backing_store;
503 break;
505 out << *layer.platform_view;
506 break;
507 }
508
509 return out << " Offset: " << layer.offset << " Size: " << layer.size;
510}
511
512//------------------------------------------------------------------------------
513// Factories and Casts
514//------------------------------------------------------------------------------
515
516inline FlutterPoint FlutterPointMake(double x, double y) {
517 FlutterPoint point = {};
518 point.x = x;
519 point.y = y;
520 return point;
521}
522
523inline FlutterSize FlutterSizeMake(double width, double height) {
524 FlutterSize size = {};
525 size.width = width;
526 size.height = height;
527 return size;
528}
529
530inline FlutterSize FlutterSizeMake(const SkVector& vector) {
531 FlutterSize size = {};
532 size.width = vector.x();
533 size.height = vector.y();
534 return size;
535}
536
538 const flutter::DlMatrix& matrix) {
539 FlutterTransformation transformation = {};
540 transformation.scaleX = matrix.m[0];
541 transformation.skewX = matrix.m[4];
542 transformation.transX = matrix.m[12];
543 transformation.skewY = matrix.m[1];
544 transformation.scaleY = matrix.m[5];
545 transformation.transY = matrix.m[13];
546 transformation.pers0 = matrix.m[3];
547 transformation.pers1 = matrix.m[7];
548 transformation.pers2 = matrix.m[15];
549 return transformation;
550}
551
553 // clang-format off
554 return flutter::DlMatrix(
555 xformation.scaleX, xformation.skewY, 0.0f, xformation.pers0,
556 xformation.skewX, xformation.scaleY, 0.0f, xformation.pers1,
557 0.0f, 0.0f, 1.0f, 0.0f,
558 xformation.transX, xformation.transY, 0.0f, xformation.pers2
559 );
560 // clang-format on
561}
562
564 return reinterpret_cast<flutter::EmbedderEngine*>(engine);
565}
566
567inline FlutterRect FlutterRectMake(const SkRect& rect) {
568 FlutterRect r = {};
569 r.left = rect.left();
570 r.top = rect.top();
571 r.right = rect.right();
572 r.bottom = rect.bottom();
573 return r;
574}
575
577 FlutterRect r = {};
578 r.left = rect.GetLeft();
579 r.top = rect.GetTop();
580 r.right = rect.GetRight();
581 r.bottom = rect.GetBottom();
582 return r;
583}
584
585inline FlutterRect FlutterRectMakeLTRB(double l, double t, double r, double b) {
586 FlutterRect rect = {};
587 rect.left = l;
588 rect.top = t;
589 rect.right = r;
590 rect.bottom = b;
591 return rect;
592}
593
594inline SkRect SkRectMake(const FlutterRect& rect) {
595 return SkRect::MakeLTRB(rect.left, rect.top, rect.right, rect.bottom);
596}
597
598inline FlutterRoundedRect FlutterRoundedRectMake(const SkRRect& rect) {
599 FlutterRoundedRect r = {};
600 r.rect = FlutterRectMake(rect.rect());
602 FlutterSizeMake(rect.radii(SkRRect::Corner::kUpperLeft_Corner));
604 FlutterSizeMake(rect.radii(SkRRect::Corner::kUpperRight_Corner));
606 FlutterSizeMake(rect.radii(SkRRect::Corner::kLowerRight_Corner));
608 FlutterSizeMake(rect.radii(SkRRect::Corner::kLowerLeft_Corner));
609 return r;
610}
611
612// NOLINTEND(google-objc-function-naming)
613
614#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_ASSERTIONS_H_
std::unique_ptr< flutter::PlatformViewIOS > platform_view
GLenum type
int32_t x
FlutterLayerContentType
Definition embedder.h:2099
@ kFlutterLayerContentTypePlatformView
Indicates that the contents of this layer are determined by the embedder.
Definition embedder.h:2104
@ kFlutterLayerContentTypeBackingStore
Definition embedder.h:2102
FlutterPlatformViewMutationType
Definition embedder.h:1997
@ kFlutterPlatformViewMutationTypeClipRoundedRect
Definition embedder.h:2006
@ kFlutterPlatformViewMutationTypeClipRect
Definition embedder.h:2003
@ kFlutterPlatformViewMutationTypeTransformation
Definition embedder.h:2009
@ kFlutterPlatformViewMutationTypeOpacity
Definition embedder.h:2000
FlutterSoftwarePixelFormat
Definition embedder.h:450
@ kFlutterSoftwarePixelFormatRGBA4444
Definition embedder.h:473
@ kFlutterSoftwarePixelFormatRGBA8888
Definition embedder.h:483
@ kFlutterSoftwarePixelFormatBGRA8888
Definition embedder.h:502
@ kFlutterSoftwarePixelFormatGray8
Definition embedder.h:454
@ kFlutterSoftwarePixelFormatNative32
Definition embedder.h:506
@ kFlutterSoftwarePixelFormatRGBX8888
Definition embedder.h:492
@ kFlutterSoftwarePixelFormatRGB565
Definition embedder.h:463
FlutterOpenGLTargetType
Definition embedder.h:411
@ kFlutterOpenGLTargetTypeFramebuffer
Definition embedder.h:417
@ kFlutterOpenGLTargetTypeSurface
Definition embedder.h:420
@ kFlutterOpenGLTargetTypeTexture
Definition embedder.h:414
FlutterBackingStoreType
Definition embedder.h:2048
@ kFlutterBackingStoreTypeSoftware2
Definition embedder.h:2060
@ kFlutterBackingStoreTypeMetal
Specifies a Metal backing store. This is backed by a Metal texture.
Definition embedder.h:2055
@ kFlutterBackingStoreTypeVulkan
Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
Definition embedder.h:2057
@ kFlutterBackingStoreTypeSoftware
Specified an software allocation for Flutter to render into using the CPU.
Definition embedder.h:2053
@ kFlutterBackingStoreTypeOpenGL
Definition embedder.h:2051
flutter::DlMatrix DlMatrixMake(const FlutterTransformation &xformation)
std::string FlutterSoftwarePixelFormatToString(FlutterSoftwarePixelFormat pixfmt)
bool operator==(const FlutterPoint &a, const FlutterPoint &b)
FlutterSize FlutterSizeMake(double width, double height)
std::string FlutterOpenGLTargetTypeToString(FlutterOpenGLTargetType type)
std::ostream & operator<<(std::ostream &out, const FlutterPoint &point)
FlutterRect FlutterRectMake(const SkRect &rect)
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)
FlutterTransformation FlutterTransformationMake(const flutter::DlMatrix &matrix)
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:84
#define FML_LOG(severity)
Definition logging.h:101
double y
bool NumberNear(double a, double b)
Definition assertions.h:12
impeller::Matrix DlMatrix
int32_t height
int32_t width
FlutterVulkanBackingStore vulkan
Definition embedder.h:2085
FlutterMetalBackingStore metal
Definition embedder.h:2083
FlutterBackingStoreType type
Specifies the type of backing store.
Definition embedder.h:2071
FlutterOpenGLBackingStore open_gl
The description of the OpenGL backing store.
Definition embedder.h:2077
FlutterSoftwareBackingStore software
The description of the software backing store.
Definition embedder.h:2079
FlutterSoftwareBackingStore2 software2
The description of the software backing store.
Definition embedder.h:2081
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStore).
Definition embedder.h:2065
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStorePresentInfo).
Definition embedder.h:2121
FlutterPoint offset
Definition embedder.h:2145
FlutterLayerContentType type
Definition embedder.h:2134
const FlutterBackingStore * backing_store
Definition embedder.h:2138
FlutterBackingStorePresentInfo * backing_store_present_info
Definition embedder.h:2151
const FlutterPlatformView * platform_view
Definition embedder.h:2141
size_t struct_size
This size of this struct. Must be sizeof(FlutterLayer).
Definition embedder.h:2131
FlutterSize size
The size of the layer (in physical pixels).
Definition embedder.h:2147
FlutterMetalTexture texture
Definition embedder.h:1974
FlutterMetalTextureHandle texture
Definition embedder.h:865
FlutterOpenGLSurface surface
Definition embedder.h:1923
FlutterOpenGLTexture texture
A texture for Flutter to render into.
Definition embedder.h:1917
FlutterOpenGLTargetType type
Definition embedder.h:1914
FlutterOpenGLFramebuffer framebuffer
Definition embedder.h:1920
uint32_t name
The name of the framebuffer.
Definition embedder.h:544
VoidCallback destruction_callback
Definition embedder.h:551
void * user_data
User data to be returned on the invocation of the destruction callback.
Definition embedder.h:547
VoidCallback destruction_callback
Definition embedder.h:600
FlutterOpenGLSurfaceCallback make_current_callback
Definition embedder.h:577
uint32_t name
The name of the texture.
Definition embedder.h:514
VoidCallback destruction_callback
Definition embedder.h:521
void * user_data
User data to be returned on the invocation of the destruction callback.
Definition embedder.h:518
uint32_t format
The texture format (example GL_RGBA8).
Definition embedder.h:516
size_t struct_size
The size of this struct. Must be sizeof(FlutterPlatformView).
Definition embedder.h:2025
const FlutterPlatformViewMutation ** mutations
Definition embedder.h:2045
FlutterPlatformViewIdentifier identifier
Definition embedder.h:2029
FlutterTransformation transformation
Definition embedder.h:2019
FlutterPlatformViewMutationType type
The type of the mutation described by the subsequent union.
Definition embedder.h:2014
FlutterRoundedRect clip_rounded_rect
Definition embedder.h:2018
A structure to represent a 2D point.
Definition embedder.h:649
A structure to represent a rectangle.
Definition embedder.h:641
double bottom
Definition embedder.h:645
double top
Definition embedder.h:643
double left
Definition embedder.h:642
double right
Definition embedder.h:644
A region represented by a collection of non-overlapping rectangles.
Definition embedder.h:2108
size_t rects_count
Number of rectangles in the region.
Definition embedder.h:2112
FlutterRect * rects
The rectangles that make up the region.
Definition embedder.h:2114
size_t struct_size
The size of this struct. Must be sizeof(FlutterRegion).
Definition embedder.h:2110
A structure to represent a rounded rectangle.
Definition embedder.h:655
FlutterRect rect
Definition embedder.h:656
FlutterSize upper_left_corner_radius
Definition embedder.h:657
FlutterSize lower_left_corner_radius
Definition embedder.h:660
FlutterSize upper_right_corner_radius
Definition embedder.h:658
FlutterSize lower_right_corner_radius
Definition embedder.h:659
A structure to represent the width and height.
Definition embedder.h:627
double height
Definition embedder.h:629
double width
Definition embedder.h:628
VoidCallback destruction_callback
Definition embedder.h:1960
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition embedder.h:1951
size_t height
The number of rows in the allocation.
Definition embedder.h:1953
FlutterSoftwarePixelFormat pixel_format
Definition embedder.h:1964
VoidCallback destruction_callback
Definition embedder.h:1941
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition embedder.h:1932
size_t height
The number of rows in the allocation.
Definition embedder.h:1934
double transY
vertical translation
Definition embedder.h:400
double pers2
perspective scale factor
Definition embedder.h:406
double skewX
horizontal skew factor
Definition embedder.h:392
double pers0
input x-axis perspective factor
Definition embedder.h:402
double scaleX
horizontal scale factor
Definition embedder.h:390
double skewY
vertical skew factor
Definition embedder.h:396
double scaleY
vertical scale factor
Definition embedder.h:398
double pers1
input y-axis perspective factor
Definition embedder.h:404
double transX
horizontal translation
Definition embedder.h:394
const FlutterVulkanImage * image
Definition embedder.h:1987
FlutterVulkanImageHandle image
Definition embedder.h:931
uint32_t format
The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
Definition embedder.h:933
A 4x4 matrix using column-major storage.
Definition matrix.h:37
Scalar m[16]
Definition matrix.h:39
constexpr auto GetBottom() const
Definition rect.h:357
constexpr auto GetTop() const
Definition rect.h:353
constexpr auto GetLeft() const
Definition rect.h:351
constexpr auto GetRight() const
Definition rect.h:355