Commit 1f8eb2a8 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

Make FPS meter color vision deficiency-friendly

This patch updates the FPS meter colors per the UX team’s suggestions:

| description                 | old color | new color                |
| --------------------------- | --------- | ------------------------ |
| dropped frame               | red       | #CA5B1DFF (orange/brown) |
| partial/missed frame        | yellow    | #FFF500FF (light yellow) |
| successfully rendered frame | green     | #AEDDFFBF (light blue)   |

Bug: chromium:1104087
Change-Id: I0654562172b5f8219502f9d121a8294c138ce0f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2384033Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803809}
parent 0f9d5c9f
......@@ -297,7 +297,7 @@ SkColor DebugColors::PictureBorderColor() {
// ======= HUD widget colors =======
SkColor DebugColors::HUDBackgroundColor() {
return SkColorSetARGB(208, 17, 17, 17);
return SkColorSetARGB(217, 0, 0, 0);
}
SkColor DebugColors::HUDSeparatorLineColor() {
return SkColorSetARGB(64, 0, 255, 0);
......@@ -313,6 +313,21 @@ SkColor DebugColors::PlatformLayerTreeTextColor() { return SK_ColorRED; }
SkColor DebugColors::FPSDisplayTextAndGraphColor() {
return SK_ColorGREEN;
}
// Color used to represent dropped compositor frames.
SkColor DebugColors::FPSDisplayDroppedFrame() {
return SkColorSetRGB(202, 91, 29);
}
// Color used to represent a "partial" frame, i.e. a frame that missed
// its commit deadline.
SkColor DebugColors::FPSDisplayMissedFrame() {
return SkColorSetRGB(255, 245, 0);
}
// Color used to represent a frame that successfully rendered.
SkColor DebugColors::FPSDisplaySuccessfulFrame() {
return SkColorSetARGB(191, 174, 221, 255);
}
SkColor DebugColors::MemoryDisplayTextColor() {
return SK_ColorCYAN;
}
......
......@@ -124,6 +124,9 @@ class CC_DEBUG_EXPORT DebugColors {
static SkColor PlatformLayerTreeTextColor();
static SkColor FPSDisplayTextAndGraphColor();
static SkColor FPSDisplayDroppedFrame();
static SkColor FPSDisplayMissedFrame();
static SkColor FPSDisplaySuccessfulFrame();
static SkColor MemoryDisplayTextColor();
static SkColor PaintTimeDisplayTextAndGraphColor();
......
......@@ -712,13 +712,13 @@ SkRect HeadsUpDisplayLayerImpl::DrawFrameThroughputDisplay(
flags.setStyle(PaintFlags::kStroke_Style);
flags.setStrokeWidth(1);
flags.setColor(SkColorSetA(SK_ColorGREEN, 128));
flags.setColor(DebugColors::FPSDisplaySuccessfulFrame());
canvas->drawPath(good_path, flags);
flags.setColor(SkColorSetA(SK_ColorRED, 128));
flags.setColor(DebugColors::FPSDisplayDroppedFrame());
canvas->drawPath(dropped_path, flags);
flags.setColor(SkColorSetA(SK_ColorYELLOW, 255));
flags.setColor(DebugColors::FPSDisplayMissedFrame());
canvas->drawPath(partial_path, flags);
return area;
......
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