5#include "gtest/gtest.h"
12TEST(UberSDFParametersTest, MakeFillRect) {
20 EXPECT_FALSE(
params.stroke.has_value());
23TEST(UberSDFParametersTest, MakeStrokeRect) {
32 EXPECT_EQ(
params.stroke, stroke);
35TEST(UberSDFParametersTest, MakeStrokeRectLowMiterLimitBecomesBevel) {
46 EXPECT_EQ(
params.stroke, expected_stroke);
49TEST(UberSDFParametersTest, MakeFillCircle) {
50 Point center = {50, 50};
56 EXPECT_EQ(
params.center, center);
58 EXPECT_FALSE(
params.stroke.has_value());
61TEST(UberSDFParametersTest, MakeStrokeCircle) {
62 Point center = {50, 50};
69 EXPECT_EQ(
params.center, center);
71 EXPECT_EQ(
params.stroke, stroke);
74TEST(UberSDFParametersTest, MakeFillOval) {
75 Point center = {25, 25};
83 EXPECT_EQ(
params.center, center);
85 EXPECT_FALSE(
params.stroke.has_value());
88TEST(UberSDFParametersTest, MakeStrokeOval) {
89 Point center = {25, 25};
98 EXPECT_EQ(
params.center, center);
100 EXPECT_EQ(
params.stroke, stroke);
103TEST(UberSDFParametersTest, MakeRoundedRect) {
107 .top_right =
Size(2.0f, 2.0f),
108 .bottom_left =
Size(3.0f, 3.0f),
109 .bottom_right =
Size(4.0f, 4.0f),
119 EXPECT_EQ(
params.radii.w, 1.0f);
120 EXPECT_EQ(
params.radii.y, 2.0f);
121 EXPECT_EQ(
params.radii.z, 3.0f);
122 EXPECT_EQ(
params.radii.x, 4.0f);
123 EXPECT_FALSE(
params.stroke.has_value());
126TEST(UberSDFParametersTest, MakeRoundedSuperellipse) {
130 .top_right =
Size(10.0f, 10.0f),
131 .bottom_left =
Size(10.0f, 10.0f),
132 .bottom_right =
Size(10.0f, 10.0f),
134 auto round_superellipse_params =
138 round_superellipse_params,
146 EXPECT_FALSE(
params.stroke.has_value());
149 round_superellipse_params.top_right.top.circle_radius);
151 round_superellipse_params.top_right.right.circle_radius);
153 EXPECT_EQ(
params.superellipse_degree.x,
154 round_superellipse_params.top_right.top.se_n);
155 EXPECT_EQ(
params.superellipse_degree.y,
156 round_superellipse_params.top_right.right.se_n);
158 EXPECT_EQ(
params.superellipse_scale.x,
159 round_superellipse_params.top_right.signed_scale.Abs().x);
160 EXPECT_EQ(
params.superellipse_scale.y,
161 round_superellipse_params.top_right.signed_scale.Abs().y);
const EmbeddedViewParams * params
TEST(FrameTimingsRecorderTest, RecordVsync)
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
static constexpr Color Red()
static RoundSuperellipseParam MakeBoundsRadii(const Rect &bounds, const RoundingRadii &radii)
A structure to store all of the parameters related to stroking a path or basic geometry object.
static constexpr TRect MakeOriginSize(const TPoint< Type > &origin, const TSize< Type > &size)
static constexpr TRect MakeXYWH(Type x, Type y, Type width, Type height)
static constexpr TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
static UberSDFParameters MakeCircle(Color color, const Point ¢er, Scalar radius, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a circle.
static UberSDFParameters MakeOval(Color color, const Rect &bounds, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for an Oval.
static UberSDFParameters MakeRoundedRect(Color color, const Rect &rect, const RoundingRadii &radii, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a rounded rectangle.
@ kRoundedSuperellipseSymmetric
static UberSDFParameters MakeRoundedSuperellipse(Color color, const Rect &bounds, const RoundSuperellipseParam &round_superellipse_params, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for an asymmetric round superellipse.
static UberSDFParameters MakeRect(Color color, const Rect &rect, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a rectangle.