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

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

Issue 149953003: Revert 247793 "Ensure GL initialization only happens once, and p..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/ui/aura/bench/DEPS ('k') | trunk/src/ui/aura/demo/DEPS » ('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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 11 matching lines...) Expand all
22 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
23 #include "ui/base/hit_test.h" 23 #include "ui/base/hit_test.h"
24 #include "ui/compositor/compositor.h" 24 #include "ui/compositor/compositor.h"
25 #include "ui/compositor/compositor_observer.h" 25 #include "ui/compositor/compositor_observer.h"
26 #include "ui/compositor/debug_utils.h" 26 #include "ui/compositor/debug_utils.h"
27 #include "ui/compositor/layer.h" 27 #include "ui/compositor/layer.h"
28 #include "ui/compositor/test/context_factories_for_test.h" 28 #include "ui/compositor/test/context_factories_for_test.h"
29 #include "ui/gfx/canvas.h" 29 #include "ui/gfx/canvas.h"
30 #include "ui/gfx/rect.h" 30 #include "ui/gfx/rect.h"
31 #include "ui/gfx/skia_util.h" 31 #include "ui/gfx/skia_util.h"
32 #include "ui/gl/gl_surface.h"
33
34 #ifndef GL_GLEXT_PROTOTYPES 32 #ifndef GL_GLEXT_PROTOTYPES
35 #define GL_GLEXT_PROTOTYPES 1 33 #define GL_GLEXT_PROTOTYPES 1
36 #endif 34 #endif
37 #include "third_party/khronos/GLES2/gl2ext.h" 35 #include "third_party/khronos/GLES2/gl2ext.h"
38 36
39 #if defined(USE_X11) 37 #if defined(USE_X11)
40 #include "base/message_loop/message_pump_x11.h" 38 #include "base/message_loop/message_pump_x11.h"
41 #endif 39 #endif
42 40
43 using base::TimeTicks; 41 using base::TimeTicks;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 DISALLOW_COPY_AND_ASSIGN(SoftwareScrollBench); 284 DISALLOW_COPY_AND_ASSIGN(SoftwareScrollBench);
287 }; 285 };
288 286
289 } // namespace 287 } // namespace
290 288
291 int main(int argc, char** argv) { 289 int main(int argc, char** argv) {
292 CommandLine::Init(argc, argv); 290 CommandLine::Init(argc, argv);
293 291
294 base::AtExitManager exit_manager; 292 base::AtExitManager exit_manager;
295 293
296 gfx::GLSurface::InitializeOneOff();
297
298 // The ContextFactory must exist before any Compositors are created. 294 // The ContextFactory must exist before any Compositors are created.
299 bool allow_test_contexts = false; 295 bool allow_test_contexts = false;
300 ui::InitializeContextFactoryForTests(allow_test_contexts); 296 ui::InitializeContextFactoryForTests(allow_test_contexts);
301 297
302 base::i18n::InitializeICU(); 298 base::i18n::InitializeICU();
303 299
304 base::MessageLoopForUI message_loop; 300 base::MessageLoopForUI message_loop;
305 aura::Env::CreateInstance(); 301 aura::Env::CreateInstance();
306 scoped_ptr<aura::TestScreen> test_screen( 302 scoped_ptr<aura::TestScreen> test_screen(
307 aura::TestScreen::CreateFullscreen()); 303 aura::TestScreen::CreateFullscreen());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100)); 352 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100));
357 #endif 353 #endif
358 354
359 root_window->host()->Show(); 355 root_window->host()->Show();
360 base::MessageLoopForUI::current()->Run(); 356 base::MessageLoopForUI::current()->Run();
361 focus_client.reset(); 357 focus_client.reset();
362 root_window.reset(); 358 root_window.reset();
363 359
364 return 0; 360 return 0;
365 } 361 }
OLDNEW
« no previous file with comments | « trunk/src/ui/aura/bench/DEPS ('k') | trunk/src/ui/aura/demo/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698