Flutter Engine
The Flutter Engine
Functions
embedder_assertions.h File Reference
#include <sstream>
#include "flutter/fml/logging.h"
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/embedder/embedder_engine.h"
#include "flutter/testing/assertions.h"
#include "gtest/gtest.h"
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/core/SkSize.h"

Go to the source code of this file.

Functions

bool operator== (const FlutterPoint &a, const FlutterPoint &b)
 
bool operator== (const FlutterRect &a, const FlutterRect &b)
 
bool operator== (const FlutterSize &a, const FlutterSize &b)
 
bool operator== (const FlutterRoundedRect &a, const FlutterRoundedRect &b)
 
bool operator== (const FlutterTransformation &a, const FlutterTransformation &b)
 
bool operator== (const FlutterOpenGLTexture &a, const FlutterOpenGLTexture &b)
 
bool operator== (const FlutterOpenGLFramebuffer &a, const FlutterOpenGLFramebuffer &b)
 
bool operator== (const FlutterMetalTexture &a, const FlutterMetalTexture &b)
 
bool operator== (const FlutterVulkanImage &a, const FlutterVulkanImage &b)
 
bool operator== (const FlutterVulkanBackingStore &a, const FlutterVulkanBackingStore &b)
 
bool operator== (const FlutterMetalBackingStore &a, const FlutterMetalBackingStore &b)
 
bool operator== (const FlutterOpenGLBackingStore &a, const FlutterOpenGLBackingStore &b)
 
bool operator== (const FlutterSoftwareBackingStore &a, const FlutterSoftwareBackingStore &b)
 
bool operator== (const FlutterSoftwareBackingStore2 &a, const FlutterSoftwareBackingStore2 &b)
 
bool operator== (const FlutterRegion &a, const FlutterRegion &b)
 
bool operator== (const FlutterBackingStorePresentInfo &a, const FlutterBackingStorePresentInfo &b)
 
bool operator== (const FlutterBackingStore &a, const FlutterBackingStore &b)
 
bool operator== (const FlutterPlatformViewMutation &a, const FlutterPlatformViewMutation &b)
 
bool operator== (const FlutterPlatformView &a, const FlutterPlatformView &b)
 
bool operator== (const FlutterLayer &a, const FlutterLayer &b)
 
std::ostream & operator<< (std::ostream &out, const FlutterPoint &point)
 
std::ostream & operator<< (std::ostream &out, const FlutterRect &r)
 
std::ostream & operator<< (std::ostream &out, const FlutterSize &size)
 
std::ostream & operator<< (std::ostream &out, const FlutterRoundedRect &r)
 
std::ostream & operator<< (std::ostream &out, const FlutterTransformation &t)
 
std::string FlutterLayerContentTypeToString (FlutterLayerContentType type)
 
std::string FlutterBackingStoreTypeToString (FlutterBackingStoreType type)
 
std::ostream & operator<< (std::ostream &out, const FlutterOpenGLTexture &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterOpenGLFramebuffer &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterMetalTexture &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterVulkanImage &item)
 
std::string FlutterPlatformViewMutationTypeToString (FlutterPlatformViewMutationType type)
 
std::ostream & operator<< (std::ostream &out, const FlutterPlatformViewMutation &m)
 
std::ostream & operator<< (std::ostream &out, const FlutterPlatformView &platform_view)
 
std::string FlutterOpenGLTargetTypeToString (FlutterOpenGLTargetType type)
 
std::string FlutterSoftwarePixelFormatToString (FlutterSoftwarePixelFormat pixfmt)
 
std::ostream & operator<< (std::ostream &out, const FlutterOpenGLBackingStore &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterSoftwareBackingStore &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterMetalBackingStore &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterVulkanBackingStore &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterSoftwareBackingStore2 &item)
 
std::ostream & operator<< (std::ostream &out, const FlutterBackingStore &backing_store)
 
std::ostream & operator<< (std::ostream &out, const FlutterLayer &layer)
 
FlutterPoint FlutterPointMake (double x, double y)
 
FlutterSize FlutterSizeMake (double width, double height)
 
FlutterSize FlutterSizeMake (const SkVector &vector)
 
FlutterTransformation FlutterTransformationMake (const SkMatrix &matrix)
 
SkMatrix SkMatrixMake (const FlutterTransformation &xformation)
 
flutter::EmbedderEngineToEmbedderEngine (const FlutterEngine &engine)
 
FlutterRect FlutterRectMake (const SkRect &rect)
 
FlutterRect FlutterRectMakeLTRB (double l, double t, double r, double b)
 
SkRect SkRectMake (const FlutterRect &rect)
 
FlutterRoundedRect FlutterRoundedRectMake (const SkRRect &rect)
 

Function Documentation

◆ FlutterBackingStoreTypeToString()

std::string FlutterBackingStoreTypeToString ( FlutterBackingStoreType  type)
inline

Definition at line 266 of file embedder_assertions.h.

267 {
268 switch (type) {
270 return "kFlutterBackingStoreTypeOpenGL";
272 return "kFlutterBackingStoreTypeSoftware";
274 return "kFlutterBackingStoreTypeMetal";
276 return "kFlutterBackingStoreTypeVulkan";
278 return "kFlutterBackingStoreTypeSoftware2";
279 }
280 return "Unknown";
281}
GLenum type
@ 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

◆ FlutterLayerContentTypeToString()

std::string FlutterLayerContentTypeToString ( FlutterLayerContentType  type)
inline

Definition at line 255 of file embedder_assertions.h.

256 {
257 switch (type) {
259 return "kFlutterLayerContentTypeBackingStore";
261 return "kFlutterLayerContentTypePlatformView";
262 }
263 return "Unknown";
264}
@ kFlutterLayerContentTypePlatformView
Indicates that the contents of this layer are determined by the embedder.
Definition: embedder.h:1795
@ kFlutterLayerContentTypeBackingStore
Definition: embedder.h:1793

◆ FlutterOpenGLTargetTypeToString()

std::string FlutterOpenGLTargetTypeToString ( FlutterOpenGLTargetType  type)
inline

Definition at line 364 of file embedder_assertions.h.

365 {
366 switch (type) {
368 return "kFlutterOpenGLTargetTypeTexture";
370 return "kFlutterOpenGLTargetTypeFramebuffer";
371 }
372 return "Unknown";
373}
@ kFlutterOpenGLTargetTypeFramebuffer
Definition: embedder.h:306
@ kFlutterOpenGLTargetTypeTexture
Definition: embedder.h:303

◆ FlutterPlatformViewMutationTypeToString()

std::string FlutterPlatformViewMutationTypeToString ( FlutterPlatformViewMutationType  type)
inline

Definition at line 312 of file embedder_assertions.h.

313 {
314 switch (type) {
316 return "kFlutterPlatformViewMutationTypeOpacity";
318 return "kFlutterPlatformViewMutationTypeClipRect";
320 return "kFlutterPlatformViewMutationTypeClipRoundedRect";
322 return "kFlutterPlatformViewMutationTypeTransformation";
323 }
324 return "Unknown";
325}
@ kFlutterPlatformViewMutationTypeClipRoundedRect
Definition: embedder.h:1697
@ kFlutterPlatformViewMutationTypeClipRect
Definition: embedder.h:1694
@ kFlutterPlatformViewMutationTypeTransformation
Definition: embedder.h:1700
@ kFlutterPlatformViewMutationTypeOpacity
Definition: embedder.h:1691

◆ FlutterPointMake()

FlutterPoint FlutterPointMake ( double  x,
double  y 
)
inline

Definition at line 493 of file embedder_assertions.h.

493 {
494 FlutterPoint point = {};
495 point.x = x;
496 point.y = y;
497 return point;
498}
double y
double x
A structure to represent a 2D point.
Definition: embedder.h:445
double y
Definition: embedder.h:447
double x
Definition: embedder.h:446

◆ FlutterRectMake()

FlutterRect FlutterRectMake ( const SkRect rect)
inline

Definition at line 545 of file embedder_assertions.h.

545 {
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}
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
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

◆ FlutterRectMakeLTRB()

FlutterRect FlutterRectMakeLTRB ( double  l,
double  t,
double  r,
double  b 
)
inline

Definition at line 554 of file embedder_assertions.h.

554 {
555 FlutterRect rect = {};
556 rect.left = l;
557 rect.top = t;
558 rect.right = r;
559 rect.bottom = b;
560 return rect;
561}
static bool b

◆ FlutterRoundedRectMake()

FlutterRoundedRect FlutterRoundedRectMake ( const SkRRect rect)
inline

Definition at line 567 of file embedder_assertions.h.

567 {
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}
FlutterSize FlutterSizeMake(double width, double height)
FlutterRect FlutterRectMake(const SkRect &rect)
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

◆ FlutterSizeMake() [1/2]

FlutterSize FlutterSizeMake ( const SkVector vector)
inline

Definition at line 507 of file embedder_assertions.h.

507 {
508 FlutterSize size = {};
509 size.width = vector.x();
510 size.height = vector.y();
511 return size;
512}
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
A structure to represent the width and height.
Definition: embedder.h:423
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181

◆ FlutterSizeMake() [2/2]

FlutterSize FlutterSizeMake ( double  width,
double  height 
)
inline

Definition at line 500 of file embedder_assertions.h.

500 {
501 FlutterSize size = {};
502 size.width = width;
503 size.height = height;
504 return size;
505}
int32_t height
int32_t width

◆ FlutterSoftwarePixelFormatToString()

std::string FlutterSoftwarePixelFormatToString ( FlutterSoftwarePixelFormat  pixfmt)
inline

Definition at line 375 of file embedder_assertions.h.

376 {
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}
@ 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
#define FML_LOG(severity)
Definition: logging.h:82
#define ERROR(message)
Definition: elf_loader.cc:260

◆ FlutterTransformationMake()

FlutterTransformation FlutterTransformationMake ( const SkMatrix matrix)
inline

Definition at line 514 of file embedder_assertions.h.

514 {
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}
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 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
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
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

◆ operator<<() [1/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterBackingStore backing_store 
)
inline

Definition at line 441 of file embedder_assertions.h.

442 {
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}
std::string FlutterBackingStoreTypeToString(FlutterBackingStoreType type)
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

◆ operator<<() [2/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterLayer layer 
)
inline

Definition at line 473 of file embedder_assertions.h.

473 {
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}
std::string FlutterLayerContentTypeToString(FlutterLayerContentType type)
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

◆ operator<<() [3/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterMetalBackingStore item 
)
inline

Definition at line 421 of file embedder_assertions.h.

422 {
423 return out << "(FlutterMetalBackingStore) Texture: " << item.texture;
424}
FlutterMetalTexture texture
Definition: embedder.h:1665

◆ operator<<() [4/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterMetalTexture item 
)
inline

Definition at line 299 of file embedder_assertions.h.

300 {
301 return out << "(FlutterMetalTexture) Texture ID: " << std::hex
302 << item.texture_id << std::dec << " Handle: 0x" << std::hex
303 << item.texture;
304}
FlutterMetalTextureHandle texture
Definition: embedder.h:661
int64_t texture_id
Definition: embedder.h:656

◆ operator<<() [5/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterOpenGLBackingStore item 
)
inline

Definition at line 398 of file embedder_assertions.h.

399 {
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}
std::string FlutterOpenGLTargetTypeToString(FlutterOpenGLTargetType type)
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

◆ operator<<() [6/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterOpenGLFramebuffer item 
)
inline

Definition at line 291 of file embedder_assertions.h.

292 {
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}
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

◆ operator<<() [7/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterOpenGLTexture item 
)
inline

Definition at line 283 of file embedder_assertions.h.

284 {
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}
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

◆ operator<<() [8/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterPlatformView platform_view 
)
inline

Definition at line 344 of file embedder_assertions.h.

345 {
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}
std::unique_ptr< flutter::PlatformViewIOS > platform_view

◆ operator<<() [9/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterPlatformViewMutation m 
)
inline

Definition at line 327 of file embedder_assertions.h.

328 {
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}
std::string FlutterPlatformViewMutationTypeToString(FlutterPlatformViewMutationType type)

◆ operator<<() [10/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterPoint point 
)
inline

Definition at line 218 of file embedder_assertions.h.

218 {
219 return out << "(" << point.x << ", " << point.y << ")";
220}

◆ operator<<() [11/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterRect r 
)
inline

Definition at line 222 of file embedder_assertions.h.

222 {
223 return out << "LTRB (" << r.left << ", " << r.top << ", " << r.right << ", "
224 << r.bottom << ")";
225}

◆ operator<<() [12/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterRoundedRect r 
)
inline

Definition at line 231 of file embedder_assertions.h.

232 {
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}

◆ operator<<() [13/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterSize size 
)
inline

Definition at line 227 of file embedder_assertions.h.

227 {
228 return out << "(" << size.width << ", " << size.height << ")";
229}

◆ operator<<() [14/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterSoftwareBackingStore item 
)
inline

Definition at line 413 of file embedder_assertions.h.

414 {
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}
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

◆ operator<<() [15/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterSoftwareBackingStore2 item 
)
inline

Definition at line 431 of file embedder_assertions.h.

432 {
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}
std::string FlutterSoftwarePixelFormatToString(FlutterSoftwarePixelFormat pixfmt)
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

◆ operator<<() [16/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterTransformation t 
)
inline

Definition at line 241 of file embedder_assertions.h.

242 {
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}

◆ operator<<() [17/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterVulkanBackingStore item 
)
inline

Definition at line 426 of file embedder_assertions.h.

427 {
428 return out << "(FlutterVulkanBackingStore) Image: " << item.image;
429}
const FlutterVulkanImage * image
Definition: embedder.h:1678

◆ operator<<() [18/18]

std::ostream & operator<< ( std::ostream &  out,
const FlutterVulkanImage item 
)
inline

Definition at line 306 of file embedder_assertions.h.

307 {
308 return out << "(FlutterVulkanTexture) Image Handle: " << std::hex
309 << item.image << std::dec << " Format: " << item.format;
310}
FlutterVulkanImageHandle image
Definition: embedder.h:727
uint32_t format
The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
Definition: embedder.h:729

◆ operator==() [1/20]

bool operator== ( const FlutterBackingStore a,
const FlutterBackingStore b 
)
inline

Definition at line 138 of file embedder_assertions.h.

139 {
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}
struct MyStruct a[10]

◆ operator==() [2/20]

bool operator== ( const FlutterBackingStorePresentInfo a,
const FlutterBackingStorePresentInfo b 
)
inline

Definition at line 133 of file embedder_assertions.h.

134 {
135 return a.struct_size == b.struct_size && *a.paint_region == *b.paint_region;
136}

◆ operator==() [3/20]

bool operator== ( const FlutterLayer a,
const FlutterLayer b 
)
inline

Definition at line 197 of file embedder_assertions.h.

197 {
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}

◆ operator==() [4/20]

bool operator== ( const FlutterMetalBackingStore a,
const FlutterMetalBackingStore b 
)
inline

Definition at line 85 of file embedder_assertions.h.

86 {
87 return a.texture == b.texture;
88}

◆ operator==() [5/20]

bool operator== ( const FlutterMetalTexture a,
const FlutterMetalTexture b 
)
inline

Definition at line 70 of file embedder_assertions.h.

71 {
72 return a.texture_id == b.texture_id && a.texture == b.texture;
73}

◆ operator==() [6/20]

bool operator== ( const FlutterOpenGLBackingStore a,
const FlutterOpenGLBackingStore b 
)
inline

Definition at line 90 of file embedder_assertions.h.

91 {
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}

◆ operator==() [7/20]

bool operator== ( const FlutterOpenGLFramebuffer a,
const FlutterOpenGLFramebuffer b 
)
inline

Definition at line 63 of file embedder_assertions.h.

64 {
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}

◆ operator==() [8/20]

bool operator== ( const FlutterOpenGLTexture a,
const FlutterOpenGLTexture b 
)
inline

Definition at line 56 of file embedder_assertions.h.

57 {
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}

◆ operator==() [9/20]

bool operator== ( const FlutterPlatformView a,
const FlutterPlatformView b 
)
inline

Definition at line 181 of file embedder_assertions.h.

182 {
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}

◆ operator==() [10/20]

bool operator== ( const FlutterPlatformViewMutation a,
const FlutterPlatformViewMutation b 
)
inline

Definition at line 161 of file embedder_assertions.h.

162 {
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}
bool NumberNear(double a, double b)
Definition: assertions.h:13

◆ operator==() [11/20]

bool operator== ( const FlutterPoint a,
const FlutterPoint b 
)
inline

Definition at line 23 of file embedder_assertions.h.

◆ operator==() [12/20]

bool operator== ( const FlutterRect a,
const FlutterRect b 
)
inline

Definition at line 28 of file embedder_assertions.h.

28 {
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}

◆ operator==() [13/20]

bool operator== ( const FlutterRegion a,
const FlutterRegion b 
)
inline

Definition at line 121 of file embedder_assertions.h.

121 {
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}

◆ operator==() [14/20]

bool operator== ( const FlutterRoundedRect a,
const FlutterRoundedRect b 
)
inline

Definition at line 40 of file embedder_assertions.h.

41 {
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}

◆ operator==() [15/20]

bool operator== ( const FlutterSize a,
const FlutterSize b 
)
inline

Definition at line 35 of file embedder_assertions.h.

35 {
36 return flutter::testing::NumberNear(a.width, b.width) &&
37 flutter::testing::NumberNear(a.height, b.height);
38}

◆ operator==() [16/20]

bool operator== ( const FlutterSoftwareBackingStore a,
const FlutterSoftwareBackingStore b 
)
inline

Definition at line 106 of file embedder_assertions.h.

107 {
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}

◆ operator==() [17/20]

bool operator== ( const FlutterSoftwareBackingStore2 a,
const FlutterSoftwareBackingStore2 b 
)
inline

Definition at line 113 of file embedder_assertions.h.

114 {
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}

◆ operator==() [18/20]

bool operator== ( const FlutterTransformation a,
const FlutterTransformation b 
)
inline

Definition at line 49 of file embedder_assertions.h.

50 {
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}

◆ operator==() [19/20]

bool operator== ( const FlutterVulkanBackingStore a,
const FlutterVulkanBackingStore b 
)
inline

Definition at line 80 of file embedder_assertions.h.

81 {
82 return a.image == b.image;
83}

◆ operator==() [20/20]

bool operator== ( const FlutterVulkanImage a,
const FlutterVulkanImage b 
)
inline

Definition at line 75 of file embedder_assertions.h.

76 {
77 return a.image == b.image && a.format == b.format;
78}

◆ SkMatrixMake()

SkMatrix SkMatrixMake ( const FlutterTransformation xformation)
inline

Definition at line 528 of file embedder_assertions.h.

528 {
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}
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

◆ SkRectMake()

SkRect SkRectMake ( const FlutterRect rect)
inline

Definition at line 563 of file embedder_assertions.h.

563 {
564 return SkRect::MakeLTRB(rect.left, rect.top, rect.right, rect.bottom);
565}
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Definition: SkRect.h:646

◆ ToEmbedderEngine()

flutter::EmbedderEngine * ToEmbedderEngine ( const FlutterEngine engine)
inline

Definition at line 541 of file embedder_assertions.h.

541 {
542 return reinterpret_cast<flutter::EmbedderEngine*>(engine);
543}
FlutterEngine engine
Definition: main.cc:68