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

Issue 717760 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocking:
issue 711146



Sign in to add a comment

ContextFactory should have a method that returns refresh rate

Project Member Reported by staraz@chromium.org, May 2 2017

Issue description

Currently, ui::Compositor sets its refresh rate to 60 if 
ContextFactory::DoesCreateTestContexts() returns false and 200 otherwise.

This is splitting/duplicating the job of setting the refresh rate between 
ui::Compositor and the ContextFactory.

Add a method to ContextFactory that returns refresh rate directly. Tests
can return higher refresh rates.
 
I think you can just replace DoesCreateTestContexts() with one that returns a refresh rate, rather than adding an additional method.

Comment 2 by staraz@google.com, May 2 2017

DoesCreateTestContexts is also used by WindowTreeHostMus here: 
https://cs.chromium.org/chromium/src/ui/aura/mus/window_tree_host_mus.cc?dr=C&l=34

Replacing DoesCreateTestContexts with something that returns refresh rates would make 
this if block 
(https://cs.chromium.org/chromium/src/ui/aura/mus/window_tree_host_mus.cc?dr=C&l=63) 
awkward IMO.
Blocking: 711146
Project Member

Comment 4 by bugdroid1@chromium.org, May 5 2017

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

commit 89b9688d75599341703719d88b5f09841ac4d5de
Author: staraz <staraz@chromium.org>
Date: Fri May 05 18:56:42 2017

Install FakeContextFactory for AuraMusWmTestBase

Override AuraMusWmTestBase::SetUp() and TearDown() to use a FakeContextFactory
for its tests and restore the original ContextFactory to avoid affecting the
other tests.

Doing this allows WindowTreeHostMus to set accelerate_widget to a non-zero value
like it normally would. WindowTreeHostMus doesn't have to have a special case
for tests anymore.

BUG= 717760 

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

[modify] https://crrev.com/89b9688d75599341703719d88b5f09841ac4d5de/ui/aura/mus/window_tree_host_mus.cc
[modify] https://crrev.com/89b9688d75599341703719d88b5f09841ac4d5de/ui/aura/test/aura_mus_test_base.cc
[modify] https://crrev.com/89b9688d75599341703719d88b5f09841ac4d5de/ui/aura/test/aura_mus_test_base.h

Status: Fixed (was: Started)

Sign in to add a comment