Flutter Engine
 
Loading...
Searching...
No Matches
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 FlutterOpenGLSurface &a, const FlutterOpenGLSurface &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 FlutterOpenGLSurface &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 flutter::DlMatrix &matrix)
 
flutter::DlMatrix DlMatrixMake (const FlutterTransformation &xformation)
 
flutter::EmbedderEngineToEmbedderEngine (const FlutterEngine &engine)
 
FlutterRect FlutterRectMake (const SkRect &rect)
 
FlutterRect FlutterRectMake (const flutter::DlRect &rect)
 
FlutterRect FlutterRectMakeLTRB (double l, double t, double r, double b)
 
SkRect SkRectMake (const FlutterRect &rect)
 
FlutterRoundedRect FlutterRoundedRectMake (const SkRRect &rect)
 

Function Documentation

◆ DlMatrixMake()

flutter::DlMatrix DlMatrixMake ( const FlutterTransformation xformation)
inline

Definition at line 552 of file embedder_assertions.h.

552 {
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}
impeller::Matrix DlMatrix
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

References FlutterTransformation::pers0, FlutterTransformation::pers1, FlutterTransformation::pers2, FlutterTransformation::scaleX, FlutterTransformation::scaleY, FlutterTransformation::skewX, FlutterTransformation::skewY, FlutterTransformation::transX, and FlutterTransformation::transY.

Referenced by flutter::testing::GetTotalMutationTransformationMatrix(), and flutter::testing::TEST_F().

◆ FlutterBackingStoreTypeToString()

std::string FlutterBackingStoreTypeToString ( FlutterBackingStoreType  type)
inline

Definition at line 275 of file embedder_assertions.h.

276 {
277 switch (type) {
279 return "kFlutterBackingStoreTypeOpenGL";
281 return "kFlutterBackingStoreTypeSoftware";
283 return "kFlutterBackingStoreTypeMetal";
285 return "kFlutterBackingStoreTypeVulkan";
287 return "kFlutterBackingStoreTypeSoftware2";
288 }
289 return "Unknown";
290}
GLenum type
@ 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

References kFlutterBackingStoreTypeMetal, kFlutterBackingStoreTypeOpenGL, kFlutterBackingStoreTypeSoftware, kFlutterBackingStoreTypeSoftware2, kFlutterBackingStoreTypeVulkan, and type.

Referenced by operator<<().

◆ FlutterLayerContentTypeToString()

std::string FlutterLayerContentTypeToString ( FlutterLayerContentType  type)
inline

Definition at line 264 of file embedder_assertions.h.

265 {
266 switch (type) {
268 return "kFlutterLayerContentTypeBackingStore";
270 return "kFlutterLayerContentTypePlatformView";
271 }
272 return "Unknown";
273}
@ kFlutterLayerContentTypePlatformView
Indicates that the contents of this layer are determined by the embedder.
Definition embedder.h:2104
@ kFlutterLayerContentTypeBackingStore
Definition embedder.h:2102

References kFlutterLayerContentTypeBackingStore, kFlutterLayerContentTypePlatformView, and type.

Referenced by operator<<().

◆ FlutterOpenGLTargetTypeToString()

std::string FlutterOpenGLTargetTypeToString ( FlutterOpenGLTargetType  type)
inline

Definition at line 382 of file embedder_assertions.h.

383 {
384 switch (type) {
386 return "kFlutterOpenGLTargetTypeTexture";
388 return "kFlutterOpenGLTargetTypeFramebuffer";
390 return "kFlutterOpenGLTargetTypeSurface";
391 }
392 return "Unknown";
393}
@ kFlutterOpenGLTargetTypeFramebuffer
Definition embedder.h:417
@ kFlutterOpenGLTargetTypeSurface
Definition embedder.h:420
@ kFlutterOpenGLTargetTypeTexture
Definition embedder.h:414

References kFlutterOpenGLTargetTypeFramebuffer, kFlutterOpenGLTargetTypeSurface, kFlutterOpenGLTargetTypeTexture, and type.

Referenced by operator<<().

◆ FlutterPlatformViewMutationTypeToString()

std::string FlutterPlatformViewMutationTypeToString ( FlutterPlatformViewMutationType  type)
inline

Definition at line 330 of file embedder_assertions.h.

331 {
332 switch (type) {
334 return "kFlutterPlatformViewMutationTypeOpacity";
336 return "kFlutterPlatformViewMutationTypeClipRect";
338 return "kFlutterPlatformViewMutationTypeClipRoundedRect";
340 return "kFlutterPlatformViewMutationTypeTransformation";
341 }
342 return "Unknown";
343}
@ kFlutterPlatformViewMutationTypeClipRoundedRect
Definition embedder.h:2006
@ kFlutterPlatformViewMutationTypeClipRect
Definition embedder.h:2003
@ kFlutterPlatformViewMutationTypeTransformation
Definition embedder.h:2009
@ kFlutterPlatformViewMutationTypeOpacity
Definition embedder.h:2000

References kFlutterPlatformViewMutationTypeClipRect, kFlutterPlatformViewMutationTypeClipRoundedRect, kFlutterPlatformViewMutationTypeOpacity, kFlutterPlatformViewMutationTypeTransformation, and type.

Referenced by operator<<().

◆ FlutterPointMake()

◆ FlutterRectMake() [1/2]

FlutterRect FlutterRectMake ( const flutter::DlRect rect)
inline

Definition at line 576 of file embedder_assertions.h.

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

References FlutterRect::bottom, impeller::TRect< T >::GetBottom(), impeller::TRect< T >::GetLeft(), impeller::TRect< T >::GetRight(), impeller::TRect< T >::GetTop(), FlutterRect::left, FlutterRect::right, and FlutterRect::top.

◆ FlutterRectMake() [2/2]

FlutterRect FlutterRectMake ( const SkRect &  rect)
inline

Definition at line 567 of file embedder_assertions.h.

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

References FlutterRect::bottom, FlutterRect::left, FlutterRect::right, and FlutterRect::top.

Referenced by FlutterRoundedRectMake(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_P().

◆ FlutterRectMakeLTRB()

◆ FlutterRoundedRectMake()

FlutterRoundedRect FlutterRoundedRectMake ( const SkRRect &  rect)
inline

Definition at line 598 of file embedder_assertions.h.

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

References FlutterRectMake(), FlutterSizeMake(), FlutterRoundedRect::lower_left_corner_radius, FlutterRoundedRect::lower_right_corner_radius, FlutterRoundedRect::rect, FlutterRoundedRect::upper_left_corner_radius, and FlutterRoundedRect::upper_right_corner_radius.

Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_P().

◆ FlutterSizeMake() [1/2]

FlutterSize FlutterSizeMake ( const SkVector &  vector)
inline

Definition at line 530 of file embedder_assertions.h.

530 {
531 FlutterSize size = {};
532 size.width = vector.x();
533 size.height = vector.y();
534 return size;
535}
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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
A structure to represent the width and height.
Definition embedder.h:627

◆ FlutterSizeMake() [2/2]

◆ FlutterSoftwarePixelFormatToString()

std::string FlutterSoftwarePixelFormatToString ( FlutterSoftwarePixelFormat  pixfmt)
inline

Definition at line 395 of file embedder_assertions.h.

396 {
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}
@ 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
#define FML_LOG(severity)
Definition logging.h:101

References FML_LOG, kFlutterSoftwarePixelFormatBGRA8888, kFlutterSoftwarePixelFormatGray8, kFlutterSoftwarePixelFormatNative32, kFlutterSoftwarePixelFormatRGB565, kFlutterSoftwarePixelFormatRGBA4444, kFlutterSoftwarePixelFormatRGBA8888, and kFlutterSoftwarePixelFormatRGBX8888.

Referenced by operator<<().

◆ FlutterTransformationMake()

FlutterTransformation FlutterTransformationMake ( const flutter::DlMatrix matrix)
inline

Definition at line 537 of file embedder_assertions.h.

538 {
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}
Scalar m[16]
Definition matrix.h:39

References impeller::Matrix::m, FlutterTransformation::pers0, FlutterTransformation::pers1, FlutterTransformation::pers2, FlutterTransformation::scaleX, FlutterTransformation::scaleY, FlutterTransformation::skewX, FlutterTransformation::skewY, FlutterTransformation::transX, and FlutterTransformation::transY.

Referenced by flutter::testing::EmbedderTestContext::GetRootSurfaceTransformation(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().

◆ operator<<() [1/19]

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

Definition at line 464 of file embedder_assertions.h.

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

References FlutterBackingStoreTypeToString(), kFlutterBackingStoreTypeMetal, kFlutterBackingStoreTypeOpenGL, kFlutterBackingStoreTypeSoftware, kFlutterBackingStoreTypeSoftware2, kFlutterBackingStoreTypeVulkan, FlutterBackingStore::metal, FlutterBackingStore::open_gl, FlutterBackingStore::software, FlutterBackingStore::software2, FlutterBackingStore::struct_size, FlutterBackingStore::type, FlutterBackingStore::user_data, and FlutterBackingStore::vulkan.

◆ operator<<() [2/19]

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

Definition at line 496 of file embedder_assertions.h.

496 {
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}
std::string FlutterLayerContentTypeToString(FlutterLayerContentType type)
FlutterPoint offset
Definition embedder.h:2145
FlutterLayerContentType type
Definition embedder.h:2134
const FlutterBackingStore * backing_store
Definition embedder.h:2138
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

References FlutterLayer::backing_store, FlutterLayerContentTypeToString(), kFlutterLayerContentTypeBackingStore, kFlutterLayerContentTypePlatformView, FlutterLayer::offset, FlutterLayer::platform_view, FlutterLayer::size, FlutterLayer::struct_size, and FlutterLayer::type.

◆ operator<<() [3/19]

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

Definition at line 444 of file embedder_assertions.h.

445 {
446 return out << "(FlutterMetalBackingStore) Texture: " << item.texture;
447}
FlutterMetalTexture texture
Definition embedder.h:1974

References FlutterMetalBackingStore::texture.

◆ operator<<() [4/19]

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

Definition at line 317 of file embedder_assertions.h.

318 {
319 return out << "(FlutterMetalTexture) Texture ID: " << std::hex
320 << item.texture_id << std::dec << " Handle: 0x" << std::hex
321 << item.texture;
322}
FlutterMetalTextureHandle texture
Definition embedder.h:865

References FlutterMetalTexture::texture, and FlutterMetalTexture::texture_id.

◆ operator<<() [5/19]

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

Definition at line 418 of file embedder_assertions.h.

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

References FlutterOpenGLTargetTypeToString(), FlutterOpenGLBackingStore::framebuffer, kFlutterOpenGLTargetTypeFramebuffer, kFlutterOpenGLTargetTypeSurface, kFlutterOpenGLTargetTypeTexture, FlutterOpenGLBackingStore::surface, FlutterOpenGLBackingStore::texture, and FlutterOpenGLBackingStore::type.

◆ operator<<() [6/19]

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

Definition at line 300 of file embedder_assertions.h.

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

References FlutterOpenGLFramebuffer::destruction_callback, FlutterOpenGLFramebuffer::name, FlutterOpenGLFramebuffer::target, and FlutterOpenGLFramebuffer::user_data.

◆ operator<<() [7/19]

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

Definition at line 308 of file embedder_assertions.h.

309 {
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}
VoidCallback destruction_callback
Definition embedder.h:600
FlutterOpenGLSurfaceCallback make_current_callback
Definition embedder.h:577

References FlutterOpenGLSurface::destruction_callback, FlutterOpenGLSurface::format, FlutterOpenGLSurface::make_current_callback, and FlutterOpenGLSurface::user_data.

◆ operator<<() [8/19]

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

Definition at line 292 of file embedder_assertions.h.

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

References FlutterOpenGLTexture::destruction_callback, FlutterOpenGLTexture::format, FlutterOpenGLTexture::name, FlutterOpenGLTexture::target, and FlutterOpenGLTexture::user_data.

◆ operator<<() [9/19]

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

Definition at line 362 of file embedder_assertions.h.

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

References i, and platform_view.

◆ operator<<() [10/19]

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

Definition at line 345 of file embedder_assertions.h.

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

References FlutterPlatformViewMutation::clip_rect, FlutterPlatformViewMutation::clip_rounded_rect, FlutterPlatformViewMutationTypeToString(), kFlutterPlatformViewMutationTypeClipRect, kFlutterPlatformViewMutationTypeClipRoundedRect, kFlutterPlatformViewMutationTypeOpacity, kFlutterPlatformViewMutationTypeTransformation, FlutterPlatformViewMutation::opacity, FlutterPlatformViewMutation::transformation, and FlutterPlatformViewMutation::type.

◆ operator<<() [11/19]

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

Definition at line 227 of file embedder_assertions.h.

227 {
228 return out << "(" << point.x << ", " << point.y << ")";
229}

References FlutterPoint::x, and FlutterPoint::y.

◆ operator<<() [12/19]

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

Definition at line 231 of file embedder_assertions.h.

231 {
232 return out << "LTRB (" << r.left << ", " << r.top << ", " << r.right << ", "
233 << r.bottom << ")";
234}

References FlutterRect::bottom, FlutterRect::left, FlutterRect::right, and FlutterRect::top.

◆ operator<<() [13/19]

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

Definition at line 240 of file embedder_assertions.h.

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

References FlutterRoundedRect::lower_left_corner_radius, FlutterRoundedRect::lower_right_corner_radius, FlutterRoundedRect::rect, FlutterRoundedRect::upper_left_corner_radius, and FlutterRoundedRect::upper_right_corner_radius.

◆ operator<<() [14/19]

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

Definition at line 236 of file embedder_assertions.h.

236 {
237 return out << "(" << size.width << ", " << size.height << ")";
238}

◆ operator<<() [15/19]

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

Definition at line 436 of file embedder_assertions.h.

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

References FlutterSoftwareBackingStore::allocation, FlutterSoftwareBackingStore::destruction_callback, FlutterSoftwareBackingStore::height, FlutterSoftwareBackingStore::row_bytes, and FlutterSoftwareBackingStore::user_data.

◆ operator<<() [16/19]

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

Definition at line 454 of file embedder_assertions.h.

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

References FlutterSoftwareBackingStore2::allocation, FlutterSoftwareBackingStore2::destruction_callback, FlutterSoftwarePixelFormatToString(), FlutterSoftwareBackingStore2::height, FlutterSoftwareBackingStore2::pixel_format, FlutterSoftwareBackingStore2::row_bytes, and FlutterSoftwareBackingStore2::user_data.

◆ operator<<() [17/19]

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

Definition at line 250 of file embedder_assertions.h.

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

References FlutterTransformation::pers0, FlutterTransformation::pers1, FlutterTransformation::pers2, FlutterTransformation::scaleX, FlutterTransformation::scaleY, FlutterTransformation::skewX, FlutterTransformation::skewY, FlutterTransformation::transX, and FlutterTransformation::transY.

◆ operator<<() [18/19]

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

Definition at line 449 of file embedder_assertions.h.

450 {
451 return out << "(FlutterVulkanBackingStore) Image: " << item.image;
452}
const FlutterVulkanImage * image
Definition embedder.h:1987

References FlutterVulkanBackingStore::image.

◆ operator<<() [19/19]

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

Definition at line 324 of file embedder_assertions.h.

325 {
326 return out << "(FlutterVulkanTexture) Image Handle: " << std::hex
327 << item.image << std::dec << " Format: " << item.format;
328}
FlutterVulkanImageHandle image
Definition embedder.h:931
uint32_t format
The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
Definition embedder.h:933

References FlutterVulkanImage::format, and FlutterVulkanImage::image.

◆ operator==() [1/21]

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

◆ operator==() [2/21]

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

Definition at line 142 of file embedder_assertions.h.

143 {
144 return a.struct_size == b.struct_size && *a.paint_region == *b.paint_region;
145}
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStorePresentInfo).
Definition embedder.h:2121

References FlutterBackingStorePresentInfo::paint_region, and FlutterBackingStorePresentInfo::struct_size.

◆ operator==() [3/21]

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

Definition at line 206 of file embedder_assertions.h.

206 {
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}
FlutterBackingStorePresentInfo * backing_store_present_info
Definition embedder.h:2151

References FlutterLayer::backing_store, FlutterLayer::backing_store_present_info, kFlutterLayerContentTypeBackingStore, kFlutterLayerContentTypePlatformView, FlutterLayer::offset, FlutterLayer::platform_view, FlutterLayer::size, FlutterLayer::struct_size, and FlutterLayer::type.

◆ operator==() [4/21]

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

Definition at line 92 of file embedder_assertions.h.

93 {
94 return a.texture == b.texture;
95}

References FlutterMetalBackingStore::texture.

◆ operator==() [5/21]

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

Definition at line 77 of file embedder_assertions.h.

78 {
79 return a.texture_id == b.texture_id && a.texture == b.texture;
80}

References FlutterMetalTexture::texture, and FlutterMetalTexture::texture_id.

◆ operator==() [6/21]

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

Definition at line 97 of file embedder_assertions.h.

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

References FlutterOpenGLBackingStore::framebuffer, kFlutterOpenGLTargetTypeFramebuffer, kFlutterOpenGLTargetTypeSurface, kFlutterOpenGLTargetTypeTexture, FlutterOpenGLBackingStore::surface, FlutterOpenGLBackingStore::texture, and FlutterOpenGLBackingStore::type.

◆ operator==() [7/21]

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}

References FlutterOpenGLFramebuffer::destruction_callback, FlutterOpenGLFramebuffer::name, FlutterOpenGLFramebuffer::target, and FlutterOpenGLFramebuffer::user_data.

◆ operator==() [8/21]

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

Definition at line 70 of file embedder_assertions.h.

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

References FlutterOpenGLSurface::destruction_callback, FlutterOpenGLSurface::format, FlutterOpenGLSurface::make_current_callback, and FlutterOpenGLSurface::user_data.

◆ operator==() [9/21]

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}

References FlutterOpenGLTexture::destruction_callback, FlutterOpenGLTexture::format, FlutterOpenGLTexture::name, FlutterOpenGLTexture::target, and FlutterOpenGLTexture::user_data.

◆ operator==() [10/21]

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

Definition at line 190 of file embedder_assertions.h.

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

References i, FlutterPlatformView::identifier, FlutterPlatformView::mutations, FlutterPlatformView::mutations_count, and FlutterPlatformView::struct_size.

◆ operator==() [11/21]

◆ operator==() [12/21]

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

Definition at line 23 of file embedder_assertions.h.

23 {
24 return flutter::testing::NumberNear(a.x, b.x) &&
26}

References flutter::testing::NumberNear(), FlutterPoint::x, and FlutterPoint::y.

◆ operator==() [13/21]

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

◆ operator==() [14/21]

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

Definition at line 130 of file embedder_assertions.h.

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

References i, FlutterRegion::rects, FlutterRegion::rects_count, and FlutterRegion::struct_size.

◆ operator==() [15/21]

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}

References FlutterRoundedRect::lower_left_corner_radius, FlutterRoundedRect::lower_right_corner_radius, FlutterRoundedRect::rect, FlutterRoundedRect::upper_left_corner_radius, and FlutterRoundedRect::upper_right_corner_radius.

◆ operator==() [16/21]

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) &&
38}
double height
Definition embedder.h:629
double width
Definition embedder.h:628

References FlutterSize::height, flutter::testing::NumberNear(), and FlutterSize::width.

◆ operator==() [17/21]

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

Definition at line 115 of file embedder_assertions.h.

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

References FlutterSoftwareBackingStore::allocation, FlutterSoftwareBackingStore::destruction_callback, FlutterSoftwareBackingStore::height, FlutterSoftwareBackingStore::row_bytes, and FlutterSoftwareBackingStore::user_data.

◆ operator==() [18/21]

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

◆ operator==() [19/21]

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}

References FlutterTransformation::pers0, FlutterTransformation::pers1, FlutterTransformation::pers2, FlutterTransformation::scaleX, FlutterTransformation::scaleY, FlutterTransformation::skewX, FlutterTransformation::skewY, FlutterTransformation::transX, and FlutterTransformation::transY.

◆ operator==() [20/21]

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

Definition at line 87 of file embedder_assertions.h.

88 {
89 return a.image == b.image;
90}

References FlutterVulkanBackingStore::image.

◆ operator==() [21/21]

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

Definition at line 82 of file embedder_assertions.h.

83 {
84 return a.image == b.image && a.format == b.format;
85}

References FlutterVulkanImage::format, and FlutterVulkanImage::image.

◆ SkRectMake()

SkRect SkRectMake ( const FlutterRect rect)
inline

Definition at line 594 of file embedder_assertions.h.

594 {
595 return SkRect::MakeLTRB(rect.left, rect.top, rect.right, rect.bottom);
596}

References FlutterRect::bottom, FlutterRect::left, FlutterRect::right, and FlutterRect::top.

Referenced by flutter::testing::TEST_F().

◆ ToEmbedderEngine()