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

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

Issue 553050: Windows now uses the TLS API instead of __declspec(thread) for client side co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 | « no previous file | gpu/command_buffer/client/gles2_lib.h » ('j') | gpu/demos/framework/plugin.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 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>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 size_t transfer_buffer_size = 512 * 1024; 71 size_t transfer_buffer_size = 512 * 1024;
72 int32 transfer_buffer_id = 72 int32 transfer_buffer_id =
73 command_buffer->CreateTransferBuffer(transfer_buffer_size); 73 command_buffer->CreateTransferBuffer(transfer_buffer_size);
74 Buffer transfer_buffer = 74 Buffer transfer_buffer =
75 command_buffer->GetTransferBuffer(transfer_buffer_id); 75 command_buffer->GetTransferBuffer(transfer_buffer_id);
76 if (!transfer_buffer.ptr) 76 if (!transfer_buffer.ptr)
77 return false; 77 return false;
78 78
79 79
80 gles2::g_gl_impl = new GLES2Implementation(helper, 80 gles2::Initialize();
81 transfer_buffer.size, 81 gles2::SetGLContext(new GLES2Implementation(helper,
82 transfer_buffer.ptr, 82 transfer_buffer.size,
83 transfer_buffer_id); 83 transfer_buffer.ptr,
84 transfer_buffer_id));
84 85
85 return command_buffer.release() != NULL; 86 return command_buffer.release() != NULL;
86 } 87 }
87 88
88 #if defined(OS_WIN) 89 #if defined(OS_WIN)
89 LRESULT CALLBACK WindowProc( 90 LRESULT CALLBACK WindowProc(
90 HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param) { 91 HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
91 switch (msg) { 92 switch (msg) {
92 case WM_CLOSE: 93 case WM_CLOSE:
93 DestroyWindow(hwnd); 94 DestroyWindow(hwnd);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 204 }
204 205
205 demo->Setup(hwnd, kCommandBufferSize); 206 demo->Setup(hwnd, kCommandBufferSize);
206 207
207 ProcessMessages(hwnd); 208 ProcessMessages(hwnd);
208 209
209 return EXIT_SUCCESS; 210 return EXIT_SUCCESS;
210 } 211 }
211 212
212 213
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_lib.h » ('j') | gpu/demos/framework/plugin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698