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

Side by Side Diff: gpu/command_buffer/client/gles2_demo.cc

Issue 463052: Update initialization of gles2_demo.cc to match... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years 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 | « no previous file | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <windowsx.h> 9 #include <windowsx.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
11 #include <stdlib.h> 11 #include <stdlib.h>
12 #include <stdio.h> 12 #include <stdio.h>
13 #include "base/at_exit.h"
14 #include "base/message_loop.h"
13 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
14 #include "base/shared_memory.h" 16 #include "base/shared_memory.h"
15 #include "base/scoped_ptr.h" 17 #include "base/scoped_ptr.h"
16 #include "gpu/command_buffer/service/gpu_processor.h" 18 #include "gpu/command_buffer/service/gpu_processor.h"
17 #include "gpu/command_buffer/service/command_buffer_service.h" 19 #include "gpu/command_buffer/service/command_buffer_service.h"
18 #include "gpu/command_buffer/client/gles2_implementation.h" 20 #include "gpu/command_buffer/client/gles2_implementation.h"
19 #include "gpu/command_buffer/client/gles2_lib.h" 21 #include "gpu/command_buffer/client/gles2_lib.h"
20 #include "gpu/command_buffer/client/gles2_demo_c.h" 22 #include "gpu/command_buffer/client/gles2_demo_c.h"
21 #include "gpu/command_buffer/client/gles2_demo_cc.h" 23 #include "gpu/command_buffer/client/gles2_demo_cc.h"
24 #include "gpu/np_utils/np_browser_stub.h"
apatrick 2009/12/08 20:51:14 You shouldn't need this now.
22 25
23 using base::SharedMemory; 26 using base::SharedMemory;
24 using command_buffer::GPUProcessor; 27 using command_buffer::GPUProcessor;
25 using command_buffer::CommandBufferService; 28 using command_buffer::CommandBufferService;
26 using command_buffer::gles2::GLES2CmdHelper; 29 using command_buffer::gles2::GLES2CmdHelper;
27 using command_buffer::gles2::GLES2Implementation; 30 using command_buffer::gles2::GLES2Implementation;
28 31
29 class GLES2Demo { 32 class GLES2Demo {
30 public: 33 public:
31 GLES2Demo(); 34 GLES2Demo();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 188
186 189
187 return hwnd; 190 return hwnd;
188 #else 191 #else
189 #error Need code. 192 #error Need code.
190 #endif 193 #endif
191 } 194 }
192 195
193 int main(int argc, const char** argv) { 196 int main(int argc, const char** argv) {
194 const int32 kCommandBufferSize = 1024 * 1024; 197 const int32 kCommandBufferSize = 1024 * 1024;
198
199 base::AtExitManager at_exit_manager;
200 MessageLoopForUI message_loop;
201
195 GLES2Demo* demo = new GLES2Demo(); 202 GLES2Demo* demo = new GLES2Demo();
196 203
197 void* hwnd = SetupWindow(); 204 void* hwnd = SetupWindow();
198 if (!hwnd) { 205 if (!hwnd) {
199 ::fprintf(stdout, "Could not setup window.\n"); 206 ::fprintf(stdout, "Could not setup window.\n");
200 return EXIT_FAILURE; 207 return EXIT_FAILURE;
201 } 208 }
202 209
203 demo->Setup(hwnd, kCommandBufferSize); 210 demo->Setup(hwnd, kCommandBufferSize);
204 211
205 ProcessMessages(hwnd); 212 ProcessMessages(hwnd);
206 213
207 return EXIT_SUCCESS; 214 return EXIT_SUCCESS;
208 } 215 }
209 216
210 217
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698