Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/service/in_process_command_buffer.h" | 5 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 params); | 291 params); |
| 292 | 292 |
| 293 base::WaitableEvent completion(true, false); | 293 base::WaitableEvent completion(true, false); |
| 294 bool result = false; | 294 bool result = false; |
| 295 QueueTask( | 295 QueueTask( |
| 296 base::Bind(&RunTaskWithResult<bool>, init_task, &result, &completion)); | 296 base::Bind(&RunTaskWithResult<bool>, init_task, &result, &completion)); |
| 297 completion.Wait(); | 297 completion.Wait(); |
| 298 | 298 |
| 299 if (result) { | 299 if (result) { |
| 300 capabilities_ = capabilities; | 300 capabilities_ = capabilities; |
| 301 capabilities_.map_image = | 301 capabilities_.map_image = false; |
|
no sievers
2014/07/22 20:53:18
force async upload path. i tried using GLImageShm
| |
| 302 capabilities_.map_image && g_gpu_memory_buffer_factory; | 302 // capabilities_.map_image && g_gpu_memory_buffer_factory; |
| 303 } | 303 } |
| 304 return result; | 304 return result; |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool InProcessCommandBuffer::InitializeOnGpuThread( | 307 bool InProcessCommandBuffer::InitializeOnGpuThread( |
| 308 const InitializeOnGpuThreadParams& params) { | 308 const InitializeOnGpuThreadParams& params) { |
| 309 CheckSequencedThread(); | 309 CheckSequencedThread(); |
| 310 gpu_thread_weak_ptr_ = gpu_thread_weak_ptr_factory_.GetWeakPtr(); | 310 gpu_thread_weak_ptr_ = gpu_thread_weak_ptr_factory_.GetWeakPtr(); |
| 311 | 311 |
| 312 DCHECK(params.size.width() >= 0 && params.size.height() >= 0); | 312 DCHECK(params.size.width() >= 0 && params.size.height() >= 0); |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 833 } | 833 } |
| 834 #endif | 834 #endif |
| 835 | 835 |
| 836 // static | 836 // static |
| 837 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( | 837 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( |
| 838 InProcessGpuMemoryBufferFactory* factory) { | 838 InProcessGpuMemoryBufferFactory* factory) { |
| 839 g_gpu_memory_buffer_factory = factory; | 839 g_gpu_memory_buffer_factory = factory; |
| 840 } | 840 } |
| 841 | 841 |
| 842 } // namespace gpu | 842 } // namespace gpu |
| OLD | NEW |