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

Side by Side Diff: gpu/demos/framework/window.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, 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
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 "gpu/demos/framework/window.h" 5 #include "gpu/demos/framework/window.h"
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 #include "gpu/command_buffer/client/gles2_lib.h" 8 #include "gpu/command_buffer/client/gles2_lib.h"
9 #include "gpu/command_buffer/service/command_buffer_service.h" 9 #include "gpu/command_buffer/service/command_buffer_service.h"
10 #include "gpu/command_buffer/service/gpu_processor.h" 10 #include "gpu/command_buffer/service/gpu_processor.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // TODO(alokp): cleanup. 110 // TODO(alokp): cleanup.
111 return false; 111 return false;
112 } 112 }
113 113
114 int32 transfer_buffer_id = 114 int32 transfer_buffer_id =
115 command_buffer->CreateTransferBuffer(kTransferBufferSize); 115 command_buffer->CreateTransferBuffer(kTransferBufferSize);
116 Buffer transfer_buffer = 116 Buffer transfer_buffer =
117 command_buffer->GetTransferBuffer(transfer_buffer_id); 117 command_buffer->GetTransferBuffer(transfer_buffer_id);
118 if (transfer_buffer.ptr == NULL) return false; 118 if (transfer_buffer.ptr == NULL) return false;
119 119
120 gles2::Initialize();
120 gles2::SetGLContext(new GLES2Implementation(helper, 121 gles2::SetGLContext(new GLES2Implementation(helper,
121 transfer_buffer.size, 122 transfer_buffer.size,
122 transfer_buffer.ptr, 123 transfer_buffer.ptr,
123 transfer_buffer_id)); 124 transfer_buffer_id));
124 return command_buffer.release() != NULL; 125 return command_buffer.release() != NULL;
125 } 126 }
126 } // namespace. 127 } // namespace.
127 128
128 namespace gpu { 129 namespace gpu {
129 namespace demos { 130 namespace demos {
(...skipping 30 matching lines...) Expand all
160 } 161 }
161 } 162 }
162 163
163 void Window::OnPaint() { 164 void Window::OnPaint() {
164 demo_->Draw(); 165 demo_->Draw();
165 ::gles2::GetGLContext()->SwapBuffers(); 166 ::gles2::GetGLContext()->SwapBuffers();
166 } 167 }
167 168
168 } // namespace demos 169 } // namespace demos
169 } // namespace gpu 170 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698