OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 implements a standalone executable demo of using GLES2 over | 5 // This file implements a standalone executable demo of using GLES2 over |
6 // command buffers. This code is temporary as the setup that happens | 6 // command buffers. This code is temporary as the setup that happens |
7 // here is in a state of flux. Eventually there will be several versions of | 7 // here is in a state of flux. Eventually there will be several versions of |
8 // setup, one for trusted code, one for pepper, one for NaCl, and maybe others. | 8 // setup, one for trusted code, one for pepper, one for NaCl, and maybe others. |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
11 #include <windowsx.h> | 11 #include <windowsx.h> |
12 #include <shellapi.h> | 12 #include <shellapi.h> |
13 #include <stdlib.h> | 13 #include <stdlib.h> |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 #include "app/gfx/gl/gl_context.h" | |
16 #include "base/at_exit.h" | 15 #include "base/at_exit.h" |
17 #include "base/command_line.h" | 16 #include "base/command_line.h" |
18 #include "base/callback.h" | 17 #include "base/callback.h" |
19 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
20 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
21 #include "base/message_loop.h" | 20 #include "base/message_loop.h" |
22 #include "base/shared_memory.h" | 21 #include "base/shared_memory.h" |
23 #include "gpu/command_buffer/service/gpu_processor.h" | 22 #include "gpu/command_buffer/service/gpu_processor.h" |
24 #include "gpu/command_buffer/service/command_buffer_service.h" | 23 #include "gpu/command_buffer/service/command_buffer_service.h" |
25 #include "gpu/command_buffer/client/gles2_implementation.h" | 24 #include "gpu/command_buffer/client/gles2_implementation.h" |
26 #include "gpu/command_buffer/client/gles2_lib.h" | 25 #include "gpu/command_buffer/client/gles2_lib.h" |
27 #include "gpu/command_buffer/client/gles2_demo_c.h" | 26 #include "gpu/command_buffer/client/gles2_demo_c.h" |
28 #include "gpu/command_buffer/client/gles2_demo_cc.h" | 27 #include "gpu/command_buffer/client/gles2_demo_cc.h" |
| 28 #include "ui/gfx/gl/gl_context.h" |
29 | 29 |
30 using base::SharedMemory; | 30 using base::SharedMemory; |
31 using gpu::Buffer; | 31 using gpu::Buffer; |
32 using gpu::GPUProcessor; | 32 using gpu::GPUProcessor; |
33 using gpu::CommandBufferService; | 33 using gpu::CommandBufferService; |
34 using gpu::gles2::GLES2CmdHelper; | 34 using gpu::gles2::GLES2CmdHelper; |
35 using gpu::gles2::GLES2Implementation; | 35 using gpu::gles2::GLES2Implementation; |
36 | 36 |
37 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
38 HINSTANCE g_instance; | 38 HINSTANCE g_instance; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 ::fprintf(stdout, "Could not setup window.\n"); | 221 ::fprintf(stdout, "Could not setup window.\n"); |
222 return EXIT_FAILURE; | 222 return EXIT_FAILURE; |
223 } | 223 } |
224 | 224 |
225 demo->Setup(hwnd, kCommandBufferSize); | 225 demo->Setup(hwnd, kCommandBufferSize); |
226 | 226 |
227 ProcessMessages(hwnd); | 227 ProcessMessages(hwnd); |
228 | 228 |
229 return EXIT_SUCCESS; | 229 return EXIT_SUCCESS; |
230 } | 230 } |
OLD | NEW |