| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 282       this)); | 282       this)); | 
| 283 | 283 | 
| 284   if (share_resources) { | 284   if (share_resources) { | 
| 285     g_all_shared_contexts.Get().insert(this); | 285     g_all_shared_contexts.Get().insert(this); | 
| 286     scoped_shared_context_lock.reset(); | 286     scoped_shared_context_lock.reset(); | 
| 287   } | 287   } | 
| 288 | 288 | 
| 289   if (!gles2_implementation_->Initialize( | 289   if (!gles2_implementation_->Initialize( | 
| 290       kStartTransferBufferSize, | 290       kStartTransferBufferSize, | 
| 291       kMinTransferBufferSize, | 291       kMinTransferBufferSize, | 
| 292       kMaxTransferBufferSize)) { | 292       kMaxTransferBufferSize, | 
|  | 293       GLES2Implementation::kNoLimit)) { | 
| 293     return false; | 294     return false; | 
| 294   } | 295   } | 
| 295 | 296 | 
| 296   return true; | 297   return true; | 
| 297 } | 298 } | 
| 298 | 299 | 
| 299 void GLInProcessContextImpl::Destroy() { | 300 void GLInProcessContextImpl::Destroy() { | 
| 300   while (!query_callbacks_.empty()) { | 301   while (!query_callbacks_.empty()) { | 
| 301     CallQueryCallback(0); | 302     CallQueryCallback(0); | 
| 302   } | 303   } | 
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 422 } | 423 } | 
| 423 | 424 | 
| 424 // static | 425 // static | 
| 425 void GLInProcessContext::SetGpuMemoryBufferFactory( | 426 void GLInProcessContext::SetGpuMemoryBufferFactory( | 
| 426     GpuMemoryBufferFactory* factory) { | 427     GpuMemoryBufferFactory* factory) { | 
| 427   DCHECK_EQ(0u, SharedContextCount()); | 428   DCHECK_EQ(0u, SharedContextCount()); | 
| 428   g_gpu_memory_buffer_factory = factory; | 429   g_gpu_memory_buffer_factory = factory; | 
| 429 } | 430 } | 
| 430 | 431 | 
| 431 }  // namespace gpu | 432 }  // namespace gpu | 
| OLD | NEW | 
|---|