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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 bool InProcessCommandBuffer::Initialize( | 262 bool InProcessCommandBuffer::Initialize( |
263 scoped_refptr<gfx::GLSurface> surface, | 263 scoped_refptr<gfx::GLSurface> surface, |
264 bool is_offscreen, | 264 bool is_offscreen, |
265 gfx::AcceleratedWidget window, | 265 gfx::AcceleratedWidget window, |
266 const gfx::Size& size, | 266 const gfx::Size& size, |
267 const std::vector<int32>& attribs, | 267 const std::vector<int32>& attribs, |
268 gfx::GpuPreference gpu_preference, | 268 gfx::GpuPreference gpu_preference, |
269 const base::Closure& context_lost_callback, | 269 const base::Closure& context_lost_callback, |
270 InProcessCommandBuffer* share_group) { | 270 InProcessCommandBuffer* share_group) { |
271 DCHECK(!share_group || service_ == share_group->service_); | 271 DCHECK(!share_group || service_.get() == share_group->service_.get()); |
272 context_lost_callback_ = WrapCallback(context_lost_callback); | 272 context_lost_callback_ = WrapCallback(context_lost_callback); |
273 | 273 |
274 if (surface.get()) { | 274 if (surface.get()) { |
275 // GPU thread must be the same as client thread due to GLSurface not being | 275 // GPU thread must be the same as client thread due to GLSurface not being |
276 // thread safe. | 276 // thread safe. |
277 sequence_checker_.reset(new base::SequenceChecker); | 277 sequence_checker_.reset(new base::SequenceChecker); |
278 surface_ = surface; | 278 surface_ = surface; |
279 } | 279 } |
280 | 280 |
281 gpu::Capabilities capabilities; | 281 gpu::Capabilities capabilities; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 } | 842 } |
843 #endif | 843 #endif |
844 | 844 |
845 // static | 845 // static |
846 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( | 846 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( |
847 InProcessGpuMemoryBufferFactory* factory) { | 847 InProcessGpuMemoryBufferFactory* factory) { |
848 g_gpu_memory_buffer_factory = factory; | 848 g_gpu_memory_buffer_factory = factory; |
849 } | 849 } |
850 | 850 |
851 } // namespace gpu | 851 } // namespace gpu |
OLD | NEW |