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.top_left.width, 1.0f);
120 EXPECT_EQ(
params.radii.top_right.width, 2.0f);
121 EXPECT_EQ(
params.radii.bottom_left.width, 3.0f);
122 EXPECT_EQ(
params.radii.bottom_right.width, 4.0f);
123 EXPECT_FALSE(
params.stroke.has_value());
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()
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.
static UberSDFParameters MakeRect(Color color, const Rect &rect, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a rectangle.