Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cdaf24d

Browse files
author
jonahwilliams
committed
fix conical gradient test.
1 parent 44b1c55 commit cdaf24d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

impeller/golden_tests/golden_tests.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#include "display_list/dl_color.h"
6+
#include "display_list/dl_tile_mode.h"
57
#include "gtest/gtest.h"
68

79
#include <sstream>
@@ -76,6 +78,20 @@ TEST_F(GoldenTests, ConicalGradient) {
7678
flutter::DlPaint paint;
7779
paint.setDrawStyle(flutter::DlDrawStyle::kFill);
7880

81+
flutter::DlColor colors[2] = {flutter::DlColor::RGBA(1, 0, 0, 1),
82+
flutter::DlColor::RGBA(0, 0, 1, 1)};
83+
Scalar stops[2] = {0, 1};
84+
85+
paint.setColorSource(flutter::DlConicalGradientColorSource::MakeConical(
86+
/*start_center=*/{125, 125}, //
87+
/*start_radius=*/125, {180, 180}, //
88+
/*end_radius=*/0, //
89+
/*stop_count=*/2, //
90+
/*colors=*/colors, //
91+
/*stops=*/stops, //
92+
/*tile_mode=*/flutter::DlTileMode::kClamp //
93+
));
94+
7995
builder.DrawRect(SkRect::MakeXYWH(10, 10, 250, 250), paint);
8096

8197
auto aiks_context =

0 commit comments

Comments
 (0)