OLD | NEW |
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/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #if defined(OS_MACOSX) | 8 #if defined(OS_MACOSX) |
9 #include "base/mac/scoped_nsautorelease_pool.h" | 9 #include "base/mac/scoped_nsautorelease_pool.h" |
10 #endif | 10 #endif |
11 #include "gpu/command_buffer/client/gles2_lib.h" | 11 #include "gpu/command_buffer/client/gles2_lib.h" |
12 #include "gpu/command_buffer/tests/gl_test_utils.h" | 12 #include "gpu/command_buffer/tests/gl_test_utils.h" |
13 #include "ui/gl/gl_surface.h" | 13 #include "ui/gl/gl_surface.h" |
14 | 14 |
15 #if defined(TOOLKIT_GTK) | 15 #if defined(TOOLKIT_GTK) |
16 #include "ui/gfx/gtk_util.h" | 16 #include "ui/gfx/gtk_util.h" |
17 #endif | 17 #endif |
18 | 18 |
19 int main(int argc, char** argv) { | 19 int main(int argc, char** argv) { |
| 20 #if !defined(OS_ANDROID) |
20 base::AtExitManager exit_manager; | 21 base::AtExitManager exit_manager; |
| 22 #endif |
21 CommandLine::Init(argc, argv); | 23 CommandLine::Init(argc, argv); |
22 #if defined(OS_MACOSX) | 24 #if defined(OS_MACOSX) |
23 base::mac::ScopedNSAutoreleasePool pool; | 25 base::mac::ScopedNSAutoreleasePool pool; |
24 #endif | 26 #endif |
25 #if defined(TOOLKIT_GTK) | 27 #if defined(TOOLKIT_GTK) |
26 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 28 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
27 #endif | 29 #endif |
28 gfx::GLSurface::InitializeOneOff(); | 30 gfx::GLSurface::InitializeOneOff(); |
29 ::gles2::Initialize(); | 31 ::gles2::Initialize(); |
30 MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI; | 32 MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI; |
31 MessageLoop main_message_loop(message_loop_type); | 33 MessageLoop main_message_loop(message_loop_type); |
32 return GLTestHelper::RunTests(argc, argv); | 34 return GLTestHelper::RunTests(argc, argv); |
33 } | 35 } |
34 | 36 |
35 | 37 |
OLD | NEW |