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

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

Issue 888783002: Composite to cc::Display from ui::InProcessContextFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « content/content_browser.gypi ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // This demo uses InProcessContextFactory which uses X on a separate Gpu 295 // This demo uses InProcessContextFactory which uses X on a separate Gpu
296 // thread. 296 // thread.
297 gfx::InitializeThreadedX11(); 297 gfx::InitializeThreadedX11();
298 #endif 298 #endif
299 299
300 gfx::GLSurface::InitializeOneOff(); 300 gfx::GLSurface::InitializeOneOff();
301 301
302 // The ContextFactory must exist before any Compositors are created. 302 // The ContextFactory must exist before any Compositors are created.
303 bool context_factory_for_test = false; 303 bool context_factory_for_test = false;
304 scoped_ptr<ui::InProcessContextFactory> context_factory( 304 scoped_ptr<ui::InProcessContextFactory> context_factory(
305 new ui::InProcessContextFactory(context_factory_for_test)); 305 new ui::InProcessContextFactory(context_factory_for_test, nullptr));
306 306
307 base::i18n::InitializeICU(); 307 base::i18n::InitializeICU();
308 308
309 base::MessageLoopForUI message_loop; 309 base::MessageLoopForUI message_loop;
310 aura::Env::CreateInstance(true); 310 aura::Env::CreateInstance(true);
311 aura::Env::GetInstance()->set_context_factory(context_factory.get()); 311 aura::Env::GetInstance()->set_context_factory(context_factory.get());
312 scoped_ptr<aura::TestScreen> test_screen( 312 scoped_ptr<aura::TestScreen> test_screen(
313 aura::TestScreen::CreateFullscreen()); 313 aura::TestScreen::CreateFullscreen());
314 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); 314 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
315 scoped_ptr<aura::WindowTreeHost> host( 315 scoped_ptr<aura::WindowTreeHost> host(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); 363 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100));
364 #endif 364 #endif
365 365
366 host->Show(); 366 host->Show();
367 base::MessageLoopForUI::current()->Run(); 367 base::MessageLoopForUI::current()->Run();
368 focus_client.reset(); 368 focus_client.reset();
369 host.reset(); 369 host.reset();
370 370
371 return 0; 371 return 0;
372 } 372 }
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698