| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_buffer/client/gl_in_process_context.h" | 5 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 command_buffer_.get())); | 253 command_buffer_.get())); |
| 254 | 254 |
| 255 if (share_resources) { | 255 if (share_resources) { |
| 256 g_all_shared_contexts.Get().insert(this); | 256 g_all_shared_contexts.Get().insert(this); |
| 257 scoped_shared_context_lock.reset(); | 257 scoped_shared_context_lock.reset(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 if (!gles2_implementation_->Initialize( | 260 if (!gles2_implementation_->Initialize( |
| 261 kStartTransferBufferSize, | 261 kStartTransferBufferSize, |
| 262 kMinTransferBufferSize, | 262 kMinTransferBufferSize, |
| 263 kMaxTransferBufferSize)) { | 263 kMaxTransferBufferSize, |
| 264 gles2::GLES2Implementation::kNoLimit)) { |
| 264 return false; | 265 return false; |
| 265 } | 266 } |
| 266 | 267 |
| 267 return true; | 268 return true; |
| 268 } | 269 } |
| 269 | 270 |
| 270 void GLInProcessContextImpl::Destroy() { | 271 void GLInProcessContextImpl::Destroy() { |
| 271 while (!query_callbacks_.empty()) { | 272 while (!query_callbacks_.empty()) { |
| 272 CallQueryCallback(0); | 273 CallQueryCallback(0); |
| 273 } | 274 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 surface->GetSize(), | 387 surface->GetSize(), |
| 387 allowed_extensions, | 388 allowed_extensions, |
| 388 attribs, | 389 attribs, |
| 389 gpu_preference)) | 390 gpu_preference)) |
| 390 return NULL; | 391 return NULL; |
| 391 | 392 |
| 392 return context.release(); | 393 return context.release(); |
| 393 } | 394 } |
| 394 | 395 |
| 395 } // namespace gpu | 396 } // namespace gpu |
| OLD | NEW |