New issue
Advanced search Search tips

Issue 636025 link

Starred by 1 user

Issue metadata

Status: Fixed
Merged: issue 636995
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Yellow highlighting on MacViews controls in views_examples_with_content_exe

Project Member Reported by shrike@chromium.org, Aug 9 2016

Issue description

Version: 54.0.2812.0
OS: 10.11, Retina Mac

What steps will reproduce the problem?
(1) Compile and run views_examples_with_content_exe --secondary-ui-md
(2) Look at slider, radio buttons, etc.

What is the expected output?
Normal control appearance

What do you see instead?
Yellow rects covering controls.

In the radio button case the yellow tracks the mouse movement. These radio buttons are (apparently) "label" buttons, which are set to display a border when the mouse is over them. I notice that this yellow appears instead of the border. The yellow also appears when you click a button.

If you omit the --secondary-ui-md flag, yellow appears in place of the radio button icons instead of across the entire row.

The controls are very sluggish in their response to mouse movement and clicking. My gut is that this yellow is a diagnostic indicator of some kind of compositing issue, perhaps related to Retina screens.

It's important we understand the cause of this because it might appear for users also.
 
Screen Shot 2016-08-09 at 11.33.33 AM.png
136 KB View Download
Screen Shot 2016-08-09 at 11.33.55 AM.png
135 KB View Download
Screen Shot 2016-08-09 at 11.34.29 AM.png
109 KB View Download
Screen Shot 2016-08-09 at 11.44.23 AM.png
131 KB View Download

Comment 1 by tapted@chromium.org, Aug 10 2016

Cc: est...@chromium.org
Yeah I suspect some hidpi diagnostic thing. I can't reproduce at my current checkout (54.0.2823.0 / r410288), but I don't have a hidpi screen. However, I don't think `Blue Button` has changed in a while, and I've definitely played with that on hidpi and not seen this.

estade might have an idea. I just spelunked through some code and couldn't find "yellow" in too many places. My guess is that these places are using low-dpi assets/canvas which is getting scaled up and something highlights that to draw attention to it.

Most of the diagnostic flags use other colors though - blues and greens. E.g., for a trippy experience you can do

views_examples_with_content_exe --secondary-ui-md --ui-show-layer-borders --ui-show-paint-rects --ui-show-fps-counter --ui-show-surface-damage-rects --ui-show-screenspace-rects

I couldn't find anything in resource_bundle, skia that's setting things to yellow, but I only did some heuristic searches.

Comment 2 by est...@chromium.org, Aug 10 2016

This happens for me on linux as well. I think it's because we have missing assets and the yellow is coming from resourcebundle. Let me look. Ok, done looking, here it is [1]:

  bitmap.eraseARGB(255, 255, 255, 0);

I'm not sure what the actual intent of that line is, but what it does is to fill the whole bitmap with #ffffff00, and red + green makes yellow.

Why are there missing assets? I bet it's some build configuration issue where we aren't packing the 2x images for that particular target.

[1] https://cs.chromium.org/chromium/src/ui/base/resource/resource_bundle.cc?rcl=0&l=109


Comment 3 by tapted@chromium.org, Aug 11 2016

Ah Thanks estade! I was probably thrown by this comment :p

    // The placeholder bitmap is bright red so people notice the problem.
    SkBitmap bitmap = CreateEmptyBitmap();


The following comment is also probably bogus

// When --highlight-missing-scaled-resources flag is specified, scaled 1x images
// are higlighted by blending them with red.


This probably relates to  Issue 618748 , and is something we've encountered, but I think it's set up to trigger a NOTREACHED()/crash in debug builds or with dchecks, which is why I haven't actually *seen* the yellow :). But a release build will give you yellow.

Pretty sure it just boils down to views_examples_with_content_exe not attempting to depend on (or load) the 200% resource pak. But that should be easy to fix -- things like ash_unittests load both bundles. And now we only have to fix it in GN \o/

Comment 4 by est...@chromium.org, Aug 11 2016

Indeed, that bright red comment is what made me question the intent of the eraseARGB call.
Mergedinto: 636995
Status: Duplicate (was: Assigned)
The missing resources problem is the same as  issue 636995  - views_examples_with_content_exe (and any target that gets resources via ui_test) only uses 1x resources. This bug doesn't affect Chrome proper, fortunately.

Comment 6 by tapted@chromium.org, Oct 10 2016

Cc: ellyjo...@chromium.org
Owner: tapted@chromium.org
Status: Started (was: Duplicate)
Actually, turns out this is a different issue to  Issue 636995  - there the problem is that content_resources.pak is clobbering the 1x fallback mechanism, making the resource totally unavailable as opposed to merely unavailable in 2x. But we we still want 2x to work in views_examples so we can do hidpi checks on the assets/sticker sheets.

So fix (for this): https://codereview.chromium.org/2407733002
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 12 2016

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

commit 66badf758355e436ba84e8a4d44cc91e643d93be
Author: tapted <tapted@chromium.org>
Date: Wed Oct 12 11:12:39 2016

Load 200% resources in views_content_client.

Currently views_examples_with_content_exe only depends on 100%
resources. However, we want to test and compare sticker sheets for both
100% and 200%.

Add a target //ui/resources:ui_test_pak_data_200_percent which repacks
200% versions of the 100% assets in ui_test_pak, and have
views_content_client depend on it.

BUG= 636025 

Review-Url: https://codereview.chromium.org/2407733002
Cr-Commit-Position: refs/heads/master@{#424711}

[modify] https://crrev.com/66badf758355e436ba84e8a4d44cc91e643d93be/ui/resources/BUILD.gn
[modify] https://crrev.com/66badf758355e436ba84e8a4d44cc91e643d93be/ui/views_content_client/BUILD.gn
[modify] https://crrev.com/66badf758355e436ba84e8a4d44cc91e643d93be/ui/views_content_client/views_content_main_delegate.cc

Comment 8 by tapted@chromium.org, Oct 25 2016

Status: Fixed (was: Started)

Sign in to add a comment