Commit d8979b24 authored by Mike Reed's avatar Mike Reed Committed by Commit Bot

Use updated factory for SkOverdrawColorFilter

Also updated test color values to be "valid". The previous set were
intended to be premul-rgba, but they were not legal premul. The new
values are SkColor values, which are defined to be unpremul.

Bug: 896969
Change-Id: Iebaf94ab767d2622798a239a4714ac4b64613225
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2053257Reviewed-by: default avatarweiliangc <weiliangc@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Cr-Commit-Position: refs/heads/master@{#741541}
parent 88cb932d
......@@ -60,12 +60,10 @@ sk_sp<SkImage> SkiaHelper::ApplyImageFilter(GrContext* context,
}
sk_sp<SkColorFilter> SkiaHelper::MakeOverdrawColorFilter() {
// TODO(xing.xu) : handle this in CPU mode, the R and B should be
// switched in CPU mode. (http://crbug.com/896969)
static const SkPMColor colors[SkOverdrawColorFilter::kNumColors] = {
0x00000000, 0x00000000, 0x2fff0000, 0x2f00ff00, 0x3f0000ff, 0x7f0000ff,
static const SkColor colors[SkOverdrawColorFilter::kNumColors] = {
0x00000000, 0x00000000, 0x2f0000ff, 0x2f00ff00, 0x3fff0000, 0x7fff0000,
};
return SkOverdrawColorFilter::Make(colors);
return SkOverdrawColorFilter::MakeWithSkColors(colors);
}
sk_sp<SkImageFilter> SkiaHelper::BuildOpacityFilter(float opacity) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment