| 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/client/gpu_memory_buffer_factory.h" | 5 #include "gpu/command_buffer/client/gpu_memory_buffer_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace gpu { | 9 namespace gpu { |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 gfx::GpuMemoryBuffer::Creator* g_gpu_memory_buffer_factory_ = NULL; | 12 GpuMemoryBuffer::Creator* g_gpu_memory_buffer_factory_ = NULL; |
| 13 } | 13 } |
| 14 | 14 |
| 15 const gfx::GpuMemoryBuffer::Creator& GetProcessDefaultGpuMemoryBufferFactory() { | 15 const GpuMemoryBuffer::Creator& GetProcessDefaultGpuMemoryBufferFactory() { |
| 16 return *g_gpu_memory_buffer_factory_; | 16 return *g_gpu_memory_buffer_factory_; |
| 17 } | 17 } |
| 18 | 18 |
| 19 void SetProcessDefaultGpuMemoryBufferFactory( | 19 void SetProcessDefaultGpuMemoryBufferFactory( |
| 20 const gfx::GpuMemoryBuffer::Creator& factory) { | 20 const GpuMemoryBuffer::Creator& factory) { |
| 21 DCHECK(g_gpu_memory_buffer_factory_ == NULL); | 21 DCHECK(g_gpu_memory_buffer_factory_ == NULL); |
| 22 g_gpu_memory_buffer_factory_ = new gfx::GpuMemoryBuffer::Creator(factory); | 22 g_gpu_memory_buffer_factory_ = new GpuMemoryBuffer::Creator(factory); |
| 23 } | 23 } |
| 24 | 24 |
| 25 } // namespace gpu | 25 } // namespace gpu |
| OLD | NEW |