Commit 8f074984 authored by danakj's avatar danakj Committed by Commit Bot

Use kPlus blending mode for solid-color themed window title bars.

With an image theme we use kPlus blending mode so that the alpha of
the active and inactive images together adds to 255, and is opaque.
Before 8f007b92 we did the same for
solid colors as well. But afterward it was lost, only applying to
images. This CL restores the kPlus mode for solid colors too.

R=oshima@chromium.org

Bug: 852612
Change-Id: I6f581d34dea85d98dc602e34a4ad87e4115d2d8c
Reviewed-on: https://chromium-review.googlesource.com/1103012Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568120}
parent 28898074
...@@ -69,7 +69,10 @@ void PaintFrameImagesInRoundRect(gfx::Canvas* canvas, ...@@ -69,7 +69,10 @@ void PaintFrameImagesInRoundRect(gfx::Canvas* canvas,
// When no images are used, just draw a color, with the animation |alpha| // When no images are used, just draw a color, with the animation |alpha|
// applied. // applied.
if (frame_image.isNull() && frame_overlay_image.isNull()) { if (frame_image.isNull() && frame_overlay_image.isNull()) {
canvas->DrawColor(SkColorSetA(opaque_background_color, alpha)); // We use kPlus blending mode so that between the active and inactive
// background colors, the result is 255 alpha (i.e. opaque).
canvas->DrawColor(SkColorSetA(opaque_background_color, alpha),
SkBlendMode::kPlus);
return; return;
} }
......
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