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

Commit d452702

Browse files
author
jonahwilliams
committed
fix alpha.
1 parent 9f5cd2c commit d452702

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

impeller/display_list/aiks_dl_blur_unittests.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,36 +307,36 @@ static sk_sp<DisplayList> MaskBlurVariantTest(
307307
Scalar alpha = config.alpha * 255;
308308

309309
Scalar y = 50;
310-
paint.setColor(DlColor::kCrimson().withAlpha(alpha));
310+
paint.setColor(DlColor::kCrimson().withAlpha(255 * alpha));
311311
builder.DrawRect(SkRect::MakeXYWH(x + 25 - radius / 2, y + radius / 2, //
312312
radius, 60.0f - radius),
313313
paint);
314314

315315
y += y_spacing;
316-
paint.setColor(DlColor::kBlue().withAlpha(alpha));
316+
paint.setColor(DlColor::kBlue().withAlpha(255 * alpha));
317317
builder.DrawCircle({x + 25, y + 25}, radius, paint);
318318

319319
y += y_spacing;
320-
paint.setColor(DlColor::kGreen().withAlpha(alpha));
320+
paint.setColor(DlColor::kGreen().withAlpha(255 * alpha));
321321
builder.DrawOval(SkRect::MakeXYWH(x + 25 - radius / 2, y + radius / 2, //
322322
radius, 60.0f - radius),
323323
paint);
324324

325325
y += y_spacing;
326-
paint.setColor(DlColor::kPurple().withAlpha(alpha));
326+
paint.setColor(DlColor::kPurple().withAlpha(255 * alpha));
327327
SkRRect rrect =
328328
SkRRect::MakeRectXY(SkRect::MakeXYWH(x, y, 60.0f, 60.0f), radius, radius);
329329
builder.DrawRRect(rrect, paint);
330330

331331
y += y_spacing;
332-
paint.setColor(DlColor::kOrange().withAlpha(alpha));
332+
paint.setColor(DlColor::kOrange().withAlpha(255 * alpha));
333333

334334
rrect =
335335
SkRRect::MakeRectXY(SkRect::MakeXYWH(x, y, 60.0f, 60.0f), radius, 5.0);
336336
builder.DrawRRect(rrect, paint);
337337

338338
y += y_spacing;
339-
paint.setColor(DlColor::kMaroon().withAlpha(alpha));
339+
paint.setColor(DlColor::kMaroon().withAlpha(255 * alpha));
340340

341341
{
342342
SkPath path;

0 commit comments

Comments
 (0)