Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: ui/aura/bench/bench_main.cc

Issue 638653003: Make ui::Compositor use ui::Scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not set disable_hi_res_timer_tasks_on_battery when testing Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if defined(USE_X11) 5 #if defined(USE_X11)
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 #endif 7 #endif
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 #if defined(USE_X11) 291 #if defined(USE_X11)
292 // This demo uses InProcessContextFactory which uses X on a separate Gpu 292 // This demo uses InProcessContextFactory which uses X on a separate Gpu
293 // thread. 293 // thread.
294 gfx::InitializeThreadedX11(); 294 gfx::InitializeThreadedX11();
295 #endif 295 #endif
296 296
297 gfx::GLSurface::InitializeOneOff(); 297 gfx::GLSurface::InitializeOneOff();
298 298
299 // The ContextFactory must exist before any Compositors are created. 299 // The ContextFactory must exist before any Compositors are created.
300 scoped_ptr<ui::InProcessContextFactory> context_factory( 300 scoped_ptr<ui::InProcessContextFactory> context_factory(
301 new ui::InProcessContextFactory()); 301 new ui::InProcessContextFactory(false));
danakj 2014/12/04 21:05:03 give boolean literals a name with a temp variable
302 302
303 base::i18n::InitializeICU(); 303 base::i18n::InitializeICU();
304 304
305 base::MessageLoopForUI message_loop; 305 base::MessageLoopForUI message_loop;
306 aura::Env::CreateInstance(true); 306 aura::Env::CreateInstance(true);
307 aura::Env::GetInstance()->set_context_factory(context_factory.get()); 307 aura::Env::GetInstance()->set_context_factory(context_factory.get());
308 scoped_ptr<aura::TestScreen> test_screen( 308 scoped_ptr<aura::TestScreen> test_screen(
309 aura::TestScreen::CreateFullscreen()); 309 aura::TestScreen::CreateFullscreen());
310 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); 310 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
311 scoped_ptr<aura::WindowTreeHost> host( 311 scoped_ptr<aura::WindowTreeHost> host(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); 359 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100));
360 #endif 360 #endif
361 361
362 host->Show(); 362 host->Show();
363 base::MessageLoopForUI::current()->Run(); 363 base::MessageLoopForUI::current()->Run();
364 focus_client.reset(); 364 focus_client.reset();
365 host.reset(); 365 host.reset();
366 366
367 return 0; 367 return 0;
368 } 368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698