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

Side by Side Diff: gpu/demos/framework/main_exe.cc

Issue 565041: Implemented window class on linux. Standalone demos are working on linux now. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | « gpu/demos/demos.gyp ('k') | gpu/demos/framework/window_linux.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) 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
OLDNEW
« no previous file with comments | « gpu/demos/demos.gyp ('k') | gpu/demos/framework/window_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698