OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" | 6 #include "base/logging.h" |
7 #include "gpu/demos/framework/window.h" | 7 #include "gpu/demos/framework/window.h" |
8 | 8 |
| 9 #if defined(OS_LINUX) |
| 10 #include <gtk/gtk.h> |
| 11 #endif // OS_LINUX |
| 12 |
9 namespace { | 13 namespace { |
10 static const int kWindowWidth = 512; | 14 static const int kWindowWidth = 512; |
11 static const int kWindowHeight = 512; | 15 static const int kWindowHeight = 512; |
12 } // namespace. | 16 } // namespace. |
13 | 17 |
14 int main(int argc, char *argv[]) { | 18 int main(int argc, char *argv[]) { |
| 19 #if defined(OS_LINUX) |
| 20 gtk_init(&argc, &argv); |
| 21 #endif // OS_LINUX |
| 22 |
15 // AtExitManager is used by singleton classes to delete themselves when | 23 // AtExitManager is used by singleton classes to delete themselves when |
16 // the program terminates. | 24 // the program terminates. |
17 base::AtExitManager at_exit_manager_; | 25 base::AtExitManager at_exit_manager_; |
18 | 26 |
19 gpu::demos::Window window; | 27 gpu::demos::Window window; |
20 CHECK(window.Init(kWindowWidth, kWindowHeight)); | 28 CHECK(window.Init(kWindowWidth, kWindowHeight)); |
21 | 29 |
22 window.MainLoop(); | 30 window.MainLoop(); |
23 return EXIT_SUCCESS; | 31 return EXIT_SUCCESS; |
24 } | 32 } |
| 33 |
OLD | NEW |