New issue
Advanced search Search tips

Issue 907894 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

FPS HUD has the wrong colors in BGRA mode

Project Member Reported by rog...@vewd.com, Nov 22

Issue description

Chrome Version: 72.0.3619.0 (locally built content_shell)
OS: Linux

What steps will reproduce the problem?
(1) ./content_shell --show-fps-counter --force-gpu-mem-available-mb=1 --disable-gpu-rasterization
(2)
(3)

What is the expected result?
The max gpu memory text should be red since it didn't have enough memory for all tiles.
The "GPU Raster" should say "off (device)" in red color.
The memory gradient meter should go from green to red. 

What happens instead?
The texts mentioned above are blue and the gradient goes from green to blue.


Please use labels and text to provide additional information.
I don't know if this has regressed recently, just discovered it by accident.

Note that the issue exists with --force-gpu-rasterization as well, just wanted to point out all places in the HUD that were showing the problem. 

It only happens when Skia is run using BGRA which is the default for non-Android. If I switch to RGBA it works as expected, i.e. by modifying skia/config/SkUserConfig.h and getting rid of this section:
#if !defined(ANDROID)   // On Android, we use the skia default settings.
 #define SK_A32_SHIFT    24
 #define SK_R32_SHIFT    16
 #define SK_G32_SHIFT    8
 #define SK_B32_SHIFT    0
#endif

I found that the issue goes away and works as expected in both rgba and bgra mode if I drop the color swizzling here:
https://cs.chromium.org/chromium/src/cc/layers/heads_up_display_layer_impl.cc?l=53&rcl=a0ca639a1300af6815c1e66eaa30372ab99c3a47
 
Cc: vmi...@chromium.org
Owner: penghuang@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5de81321f8a5d76f9cbc5b8f82e7425f4be82c7d

commit 5de81321f8a5d76f9cbc5b8f82e7425f4be82c7d
Author: Peng Huang <penghuang@chromium.org>
Date: Tue Nov 27 22:08:53 2018

Fix HUD pixel swizzle issue.

Fix the issue by:
* Use the default color matrix for paint canvas.
* For SW, we use correct gl format and type to upload pixel data
  to texture with SubTexImage2D().


Bug:  907894 
Change-Id: I81f2002a6dba7e048183634e6eb3f31fea69aee6
Reviewed-on: https://chromium-review.googlesource.com/c/1352450
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611358}
[modify] https://crrev.com/5de81321f8a5d76f9cbc5b8f82e7425f4be82c7d/cc/layers/heads_up_display_layer_impl.cc

Status: Fixed (was: Started)

Sign in to add a comment