New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 733641 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Migrate ash::ShellInitParams::blocking_pool to TaskScheduler for ICC color config file load

Project Member Reported by jamescook@chromium.org, Jun 15 2017

Issue description

It's used in Shell construction to init the DisplayColorManager

https://cs.chromium.org/chromium/src/ash/display/display_color_manager_chromeos.h?gsn=blocking_pool&l=38

(and used in wallpaper tests, but those seem incidental)

https://cs.chromium.org/chromium/src/ash/wallpaper/wallpaper_controller_unittest.cc?gsn=blocking_pool&l=385

I think in the former case it's just being used to read an ICC file from disk:
https://cs.chromium.org/chromium/src/third_party/qcms/src/iccread.c?gsn=blocking_pool&l=1628

It probably just needs to use base::PostTask directly with traits MayBlock().

https://chromium.googlesource.com/chromium/src/+/master/docs/threading_and_tasks.md

However, I'm not sure what the priority is. This file read seems to happen whenever the display config changes.

oshima, do you know if this task needs to run with high priority?

 
Cc: glevin@chromium.org
Status: Started (was: Assigned)
glevin, do you know if loading ICC profiles is a time sensitive task (like, is the user waiting for something to happen during the load)?

Comment 2 by glevin@chromium.org, Jun 15 2017

I believe that ICC loading was done during startup, but I don't recall the specifics (if I ever knew them).  robert.bradford@intel.com might have a better idea.
After loading and parsing an ICC file the appearance of the user's display may change appearance after the color correction profile is loaded and applied through the hardware.

As this happens when the display configuration is changed (e.g. via a hotplug or initial boot) it would be preferable if the loading, parsing and application could happen as close to the initial modeset as possible to avoid any change being as noticeable.

To answer your original question this is not a user initiated activity and so the user is not waiting for something to happen.
But the user might have just plugged in a monitor and is waiting for either:
1. It to light up, or
2. It to have correct colors

So the user is sort-of waiting on this file being loaded, right?

@jamecook: Yes that is a fair analysis (I guess I was trying to say there is no spinner saying "Loading...")

Comment 6 by osh...@chromium.org, Jun 15 2017

USE_VISIBLE seems to be the right one, although BACKGROUND may be just fine as this isn't really critical to start using the device. (correct me if I'm wrong)

This should fix the use of blocking pool in ash/shell/content/client/shell_browser_main_parts.cc :)

Comment 7 by osh...@chromium.org, Jun 15 2017

Cc: sky@chromium.org
Looks like we can simply remove AshTestEnvironment::GetBlockingPool() once this is fixed. +sky@
I split the wallpaper stuff out to  Issue 733728  and have a fix for it.

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 16 2017

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

commit 8ba362ce4f13531898ed999aaae09c428c9a7dac
Author: James Cook <jamescook@chromium.org>
Date: Fri Jun 16 20:07:40 2017

chromeos: Don't use blocking pool in ash::DisplayColorManager

Eliminate the injected blocking pool and run tasks on a local sequenced
task runner instead. Use sequenced tasks to ensure ordered ICC profile
loading if the user (or test hardware) rapidly connects and disconnects
displays.

QuirksManager still uses the content module blocking pool, but I don't
see sequence dependencies between DisplayColorManager and QuirksManager,
so I don't think they have to share.

This will allow ash::ShellInitParams::blocking_pool to be removed. That
will happen in a follow-up CL.

Bug:  733641 , 667892 
Test: ash_unittests, chrome unit_tests
Change-Id: I3d1f1dcadf943ef66252356b4428a2369d3945d9
Reviewed-on: https://chromium-review.googlesource.com/537143
Reviewed-by: Greg Levin <glevin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480139}
[modify] https://crrev.com/8ba362ce4f13531898ed999aaae09c428c9a7dac/ash/display/display_color_manager_chromeos.cc
[modify] https://crrev.com/8ba362ce4f13531898ed999aaae09c428c9a7dac/ash/display/display_color_manager_chromeos.h
[modify] https://crrev.com/8ba362ce4f13531898ed999aaae09c428c9a7dac/ash/display/display_color_manager_chromeos_unittest.cc
[modify] https://crrev.com/8ba362ce4f13531898ed999aaae09c428c9a7dac/ash/shell.cc
[modify] https://crrev.com/8ba362ce4f13531898ed999aaae09c428c9a7dac/ash/shell.h
[modify] https://crrev.com/8ba362ce4f13531898ed999aaae09c428c9a7dac/ash/shell_init_params.h

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 16 2017

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

commit 8b28a6e45b811e3cc2a272c57b3374ae6cca0b28
Author: James Cook <jamescook@chromium.org>
Date: Fri Jun 16 20:27:01 2017

chromeos: Eliminate ash::ShellInitParams::blocking_pool

Ash no longer uses an injected blocking pool for tasks. Instead it uses
the TaskScheduler API directly.

Bug:  733641 , 667892 
Test: ash_unittests, chrome unit_tests
Change-Id: Ibf8a12fb721b2661d60d8db85cd4dd798fa12690
Reviewed-on: https://chromium-review.googlesource.com/537973
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480151}
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/mus/window_manager.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/mus/window_manager.h
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/mus/window_manager_application.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/mus/window_manager_application.h
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/shell/content/client/shell_browser_main_parts.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/shell_init_params.h
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/test/ash_test_environment.h
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/test/ash_test_environment_content.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/test/ash_test_environment_content.h
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/test/ash_test_environment_default.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/ash/test/ash_test_helper.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/chrome/browser/ui/ash/ash_init.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/chrome/test/base/ash_test_environment_chrome.cc
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/chrome/test/base/ash_test_environment_chrome.h
[modify] https://crrev.com/8b28a6e45b811e3cc2a272c57b3374ae6cca0b28/chrome/test/base/view_event_test_platform_part_chromeos.cc

Status: Fixed (was: Started)

Comment 12 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment