Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions testing/dart/image_filter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const List<double> halvesBrightnessColorMatrix = <double>[
0, 0, 0, 1, 0,
];

void main() {
void main() async {
Future<Uint32List> getBytesForPaint(Paint paint, {int width = 3, int height = 3}) async {
final PictureRecorder recorder = PictureRecorder();
final Canvas recorderCanvas = Canvas(recorder);
Expand Down Expand Up @@ -302,8 +302,6 @@ void main() {

// Tests that FilterQuality.<value> produces the expected golden file.
group('ImageFilter|FilterQuality', () async {
final ImageComparer comparer = await ImageComparer.create();

/// Draw a red-green checkerboard pattern with 1x1 squares (pixels).
Future<Image> drawCheckerboard({
int width = 100,
Expand Down Expand Up @@ -354,6 +352,7 @@ void main() {
}

test('Scaling a checkerboard of 1x1 red-green pixels with FilterQuality.none', () async {
final ImageComparer comparer = await ImageComparer.create();
final Image base = await redGreenCheckerboard;
final Image scaled = await shrinkAndScaleImage(base, FilterQuality.none);
await comparer.addGoldenImage(scaled, 'dart_ui_filter_quality_none_scale_1x1_red_green_checkerboard.png');
Expand Down