@@ -2232,70 +2232,6 @@ TEST_P(AiksTest, CanDrawPoints) {
2232
2232
ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
2233
2233
}
2234
2234
2235
- // Regression test for https://github.com/flutter/flutter/issues/127374.
2236
- TEST_P (AiksTest, DrawAtlasWithColorAdvancedAndTransform) {
2237
- // Draws the image as four squares stiched together.
2238
- auto atlas = CreateTextureForFixture (" bay_bridge.jpg" );
2239
- auto size = atlas->GetSize ();
2240
- auto image = std::make_shared<Image>(atlas);
2241
- // Divide image into four quadrants.
2242
- Scalar half_width = size.width / 2 ;
2243
- Scalar half_height = size.height / 2 ;
2244
- std::vector<Rect > texture_coordinates = {
2245
- Rect::MakeLTRB (0 , 0 , half_width, half_height),
2246
- Rect::MakeLTRB (half_width, 0 , size.width , half_height),
2247
- Rect::MakeLTRB (0 , half_height, half_width, size.height ),
2248
- Rect::MakeLTRB (half_width, half_height, size.width , size.height )};
2249
- // Position quadrants adjacent to eachother.
2250
- std::vector<Matrix> transforms = {
2251
- Matrix::MakeTranslation ({0 , 0 , 0 }),
2252
- Matrix::MakeTranslation ({half_width, 0 , 0 }),
2253
- Matrix::MakeTranslation ({0 , half_height, 0 }),
2254
- Matrix::MakeTranslation ({half_width, half_height, 0 })};
2255
- std::vector<Color> colors = {Color::Red (), Color::Green (), Color::Blue (),
2256
- Color::Yellow ()};
2257
-
2258
- Paint paint;
2259
-
2260
- Canvas canvas;
2261
- canvas.Scale ({0.25 , 0.25 , 1.0 });
2262
- canvas.DrawAtlas (image, transforms, texture_coordinates, colors,
2263
- BlendMode::kModulate , {}, std::nullopt, paint);
2264
-
2265
- ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
2266
- }
2267
-
2268
- // Regression test for https://github.com/flutter/flutter/issues/127374.
2269
- TEST_P (AiksTest, DrawAtlasAdvancedAndTransform) {
2270
- // Draws the image as four squares stiched together.
2271
- auto atlas = CreateTextureForFixture (" bay_bridge.jpg" );
2272
- auto size = atlas->GetSize ();
2273
- auto image = std::make_shared<Image>(atlas);
2274
- // Divide image into four quadrants.
2275
- Scalar half_width = size.width / 2 ;
2276
- Scalar half_height = size.height / 2 ;
2277
- std::vector<Rect > texture_coordinates = {
2278
- Rect::MakeLTRB (0 , 0 , half_width, half_height),
2279
- Rect::MakeLTRB (half_width, 0 , size.width , half_height),
2280
- Rect::MakeLTRB (0 , half_height, half_width, size.height ),
2281
- Rect::MakeLTRB (half_width, half_height, size.width , size.height )};
2282
- // Position quadrants adjacent to eachother.
2283
- std::vector<Matrix> transforms = {
2284
- Matrix::MakeTranslation ({0 , 0 , 0 }),
2285
- Matrix::MakeTranslation ({half_width, 0 , 0 }),
2286
- Matrix::MakeTranslation ({0 , half_height, 0 }),
2287
- Matrix::MakeTranslation ({half_width, half_height, 0 })};
2288
-
2289
- Paint paint;
2290
-
2291
- Canvas canvas;
2292
- canvas.Scale ({0.25 , 0.25 , 1.0 });
2293
- canvas.DrawAtlas (image, transforms, texture_coordinates, {},
2294
- BlendMode::kModulate , {}, std::nullopt, paint);
2295
-
2296
- ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
2297
- }
2298
-
2299
2235
TEST_P (AiksTest, CanDrawPointsWithTextureMap) {
2300
2236
auto texture = CreateTextureForFixture (" table_mountain_nx.png" ,
2301
2237
/* enable_mipmapping=*/ true );
@@ -2860,38 +2796,6 @@ TEST_P(AiksTest, MipmapGenerationWorksCorrectly) {
2860
2796
ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
2861
2797
}
2862
2798
2863
- TEST_P (AiksTest, DrawAtlasPlusWideGamut) {
2864
- EXPECT_EQ (GetContext ()->GetCapabilities ()->GetDefaultColorFormat (),
2865
- PixelFormat::kB10G10R10A10XR );
2866
-
2867
- // Draws the image as four squares stiched together.
2868
- auto atlas =
2869
- std::make_shared<Image>(CreateTextureForFixture (" bay_bridge.jpg" ));
2870
- auto size = atlas->GetSize ();
2871
- // Divide image into four quadrants.
2872
- Scalar half_width = size.width / 2 ;
2873
- Scalar half_height = size.height / 2 ;
2874
- std::vector<Rect > texture_coordinates = {
2875
- Rect::MakeLTRB (0 , 0 , half_width, half_height),
2876
- Rect::MakeLTRB (half_width, 0 , size.width , half_height),
2877
- Rect::MakeLTRB (0 , half_height, half_width, size.height ),
2878
- Rect::MakeLTRB (half_width, half_height, size.width , size.height )};
2879
- // Position quadrants adjacent to eachother.
2880
- std::vector<Matrix> transforms = {
2881
- Matrix::MakeTranslation ({0 , 0 , 0 }),
2882
- Matrix::MakeTranslation ({half_width, 0 , 0 }),
2883
- Matrix::MakeTranslation ({0 , half_height, 0 }),
2884
- Matrix::MakeTranslation ({half_width, half_height, 0 })};
2885
- std::vector<Color> colors = {Color::Red (), Color::Green (), Color::Blue (),
2886
- Color::Yellow ()};
2887
-
2888
- Canvas canvas;
2889
- canvas.DrawAtlas (atlas, transforms, texture_coordinates, colors,
2890
- BlendMode::kPlus , {}, std::nullopt, {});
2891
-
2892
- ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
2893
- }
2894
-
2895
2799
// https://github.com/flutter/flutter/issues/146648
2896
2800
TEST_P (AiksTest, StrokedPathWithMoveToThenCloseDrawnCorrectly) {
2897
2801
Path path = PathBuilder{}
0 commit comments