Commit 6c88fc8b authored by Tobias Sargeant's avatar Tobias Sargeant Committed by Commit Bot

[wv-dark] Preserve alpha transparency when inverting luminance.

Fixes: 963456
Bug: 939312,963456
Change-Id: Ia3d040d396cfaffe1d8ca68fd51cda42beed7e01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1613985
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: default avatarAnna Malova <amalova@chromium.org>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661001}
parent 247cd6ef
......@@ -119,8 +119,9 @@ base::Optional<cc::PaintFlags> DarkModeFilter::ApplyToFlagsIfNeeded(
dark_mode_flags.setColorFilter(default_filter_);
} else {
auto invertedColor = ApplyIfNeeded(flags.getColor());
dark_mode_flags.setColor(SkColorSetRGB(
invertedColor.Red(), invertedColor.Green(), invertedColor.Blue()));
dark_mode_flags.setColor(
SkColorSetARGB(invertedColor.Alpha(), invertedColor.Red(),
invertedColor.Green(), invertedColor.Blue()));
}
return base::make_optional<cc::PaintFlags>(std::move(dark_mode_flags));
......
......@@ -5,7 +5,7 @@ PASS touch pointercancel should not have any coalesced events
PASS touch pointerover should not have any coalesced events
PASS touch pointerenter should not have any coalesced events
PASS touch pointerdown should not have any coalesced events
FAIL touch pointermove should have >2 coalesced events as main thread is busy.assert_greater_than: pointermove should have at least 2 coalesced events. expected a number greater than 1 but got 1
FAIL touch pointermove should have >2 coalesced events as main thread is busy. assert_greater_than: pointermove should have at least 2 coalesced events. expected a number greater than 1 but got 1
PASS touch pointermove coalesced events should all be marked as trusted.
PASS touch time stamps of coalesced events must be ascending.
PASS touch pointermove coalesced events should all bubbles and cancelable as false.
......
This is a testharness.js-based test.
PASS touch coalesced events attributes in pointerevents
PASS PointerEvent Automation
PASS touch pointercancel should not have any coalesced events
PASS touch pointerover should not have any coalesced events
PASS touch pointerenter should not have any coalesced events
PASS touch pointerdown should not have any coalesced events
FAIL touch pointermove should have >2 coalesced events as main thread is busy. assert_greater_than: pointermove should have at least 2 coalesced events. expected a number greater than 1 but got 1
PASS touch pointermove coalesced events should all be marked as trusted.
PASS touch time stamps of coalesced events must be ascending.
PASS touch pointermove coalesced events should all bubbles and cancelable as false.
PASS touch pointerup should not have any coalesced events
PASS touch pointerout should not have any coalesced events
PASS touch pointerleave should not have any coalesced events
Harness: the test ran to completion.
......@@ -5,7 +5,7 @@ PASS touch pointercancel should not have any coalesced events
PASS touch pointerover should not have any coalesced events
PASS touch pointerenter should not have any coalesced events
PASS touch pointerdown should not have any coalesced events
FAIL touch pointermove should have >2 coalesced events as main thread is busy. assert_greater_than: pointermove should have at least 2 coalesced events. expected a number greater than 1 but got 1
PASS touch pointermove should have >2 coalesced events as main thread is busy.
PASS touch pointermove coalesced events should all be marked as trusted.
PASS touch time stamps of coalesced events must be ascending.
PASS touch pointermove coalesced events should all bubbles and cancelable as false.
......
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