@@ -97,7 +97,6 @@ BrushPaint CreateTestPaint() {
9797 .mapping = BrushPaint::TextureMapping::kStamping ,
9898 .size_unit = BrushPaint::TextureSizeUnit::kBrushSize ,
9999 .size = {3 , 5 },
100- .size_jitter = {0.1 , 2 },
101100 .keyframes = {{.progress = 0.1 , .rotation = kFullTurn / 8 }},
102101 .blend_mode = BrushPaint::BlendMode::kDstIn }}};
103102}
@@ -138,7 +137,6 @@ TEST(BrushFamilyTest, StringifyWithNoId) {
138137 " client_texture_id=test-paint, mapping=kStamping, "
139138 " origin=kStrokeSpaceOrigin, size_unit=kBrushSize, wrap_x=kRepeat, "
140139 " wrap_y=kRepeat, size=<3, 5>, offset=<0, 0>, rotation=0π, "
141- " size_jitter=<0.1, 2>, offset_jitter=<0, 0>, rotation_jitter=0π, "
142140 " opacity=1, animation_frames=1, animation_rows=1, "
143141 " animation_columns=1, animation_duration=1s, "
144142 " keyframes={TextureKeyframe{progress=0.1, "
@@ -159,7 +157,6 @@ TEST(BrushFamilyTest, StringifyWithId) {
159157 " texture_id=test-paint, mapping=kStamping, "
160158 " origin=kStrokeSpaceOrigin, size_unit=kBrushSize, wrap_x=kRepeat, "
161159 " wrap_y=kRepeat, size=<3, 5>, offset=<0, 0>, rotation=0π, "
162- " size_jitter=<0.1, 2>, offset_jitter=<0, 0>, rotation_jitter=0π, "
163160 " opacity=1, animation_frames=1, animation_rows=1, "
164161 " animation_columns=1, animation_duration=1s, "
165162 " keyframes={TextureKeyframe{progress=0.1, "
@@ -1063,78 +1060,6 @@ TEST(BrushFamilyTest, CreateWithInvalidBrushPaint) {
10631060 EXPECT_THAT (status.message (),
10641061 HasSubstr (" BrushPaint::TextureLayer::offset" ));
10651062 }
1066- // `TextureLayer::size_jitter` has negative component.
1067- {
1068- absl::Status status =
1069- BrushFamily::Create (
1070- BrushTip{.scale = {3 , 3 }, .corner_rounding = 0 },
1071- {.texture_layers = {{.client_texture_id =
1072- std::string (kTestTextureId ),
1073- .size = {1 , 3 },
1074- .size_jitter = {-0.1 , 0.4 }}}})
1075- .status ();
1076- EXPECT_EQ (status.code (), kInvalidArgument );
1077- EXPECT_THAT (status.message (),
1078- HasSubstr (" BrushPaint::TextureLayer::size_jitter" ));
1079- }
1080- // `TextureLayer::size_jitter` is greater than size component.
1081- {
1082- absl::Status status =
1083- BrushFamily::Create (
1084- BrushTip{.scale = {3 , 3 }, .corner_rounding = 0 },
1085- {.texture_layers = {{.client_texture_id =
1086- std::string (kTestTextureId ),
1087- .size = {1 , 3 },
1088- .size_jitter = {0.1 , 4 }}}})
1089- .status ();
1090- EXPECT_EQ (status.code (), kInvalidArgument );
1091- EXPECT_THAT (status.message (),
1092- HasSubstr (" BrushPaint::TextureLayer::size_jitter" ));
1093- }
1094- // `TextureLayer::offset_jitter` has negative component.
1095- {
1096- absl::Status status =
1097- BrushFamily::Create (
1098- BrushTip{.scale = {3 , 3 }, .corner_rounding = 0 },
1099- {.texture_layers = {{.client_texture_id =
1100- std::string (kTestTextureId ),
1101- .size = {1 , 3 },
1102- .offset = {0.8 , 0.7 },
1103- .offset_jitter = {-0.1 , 0.4 }}}})
1104- .status ();
1105- EXPECT_EQ (status.code (), kInvalidArgument );
1106- EXPECT_THAT (status.message (),
1107- HasSubstr (" BrushPaint::TextureLayer::offset_jitter" ));
1108- }
1109- // `TextureLayer::offset_jitter` is greater than 1.
1110- {
1111- absl::Status status =
1112- BrushFamily::Create (
1113- BrushTip{.scale = {3 , 3 }, .corner_rounding = 0 },
1114- {.texture_layers = {{.client_texture_id =
1115- std::string (kTestTextureId ),
1116- .size = {1 , 3 },
1117- .offset = {0.8 , 0.7 },
1118- .offset_jitter = {0.1 , 4 }}}})
1119- .status ();
1120- EXPECT_EQ (status.code (), kInvalidArgument );
1121- EXPECT_THAT (status.message (),
1122- HasSubstr (" BrushPaint::TextureLayer::offset_jitter" ));
1123- }
1124- // `TextureLayer::size_jitter` has negative component.
1125- {
1126- absl::Status status =
1127- BrushFamily::Create (
1128- BrushTip{.scale = {3 , 3 }, .corner_rounding = 0 },
1129- {.texture_layers = {{.client_texture_id =
1130- std::string (kTestTextureId ),
1131- .size = {1 , 3 },
1132- .size_jitter = {-0.1 , 0.4 }}}})
1133- .status ();
1134- EXPECT_EQ (status.code (), kInvalidArgument );
1135- EXPECT_THAT (status.message (),
1136- HasSubstr (" BrushPaint::TextureLayer::size_jitter" ));
1137- }
11381063 // `TextureLayer::opacity` is negative.
11391064 {
11401065 absl::Status status =
0 commit comments