| 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 "media/renderers/mock_gpu_video_accelerator_factories.h" | 5 #include "media/renderers/mock_gpu_video_accelerator_factories.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "ui/gfx/buffer_format_util.h" | 8 #include "ui/gfx/buffer_format_util.h" |
| 9 #include "ui/gfx/gpu_memory_buffer.h" | 9 #include "ui/gfx/gpu_memory_buffer.h" |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // unnamed namespace | 81 } // unnamed namespace |
| 82 | 82 |
| 83 MockGpuVideoAcceleratorFactories::MockGpuVideoAcceleratorFactories( | 83 MockGpuVideoAcceleratorFactories::MockGpuVideoAcceleratorFactories( |
| 84 gpu::gles2::GLES2Interface* gles2) | 84 gpu::gles2::GLES2Interface* gles2) |
| 85 : gles2_(gles2) {} | 85 : gles2_(gles2) {} |
| 86 | 86 |
| 87 MockGpuVideoAcceleratorFactories::~MockGpuVideoAcceleratorFactories() {} | 87 MockGpuVideoAcceleratorFactories::~MockGpuVideoAcceleratorFactories() {} |
| 88 | 88 |
| 89 bool MockGpuVideoAcceleratorFactories::IsGpuVideoAcceleratorEnabled() { | 89 bool MockGpuVideoAcceleratorFactories::IsGpuVideoDecodeAcceleratorEnabled() { |
| 90 return true; | 90 return true; |
| 91 } | 91 } |
| 92 | 92 |
| 93 std::unique_ptr<gfx::GpuMemoryBuffer> | 93 std::unique_ptr<gfx::GpuMemoryBuffer> |
| 94 MockGpuVideoAcceleratorFactories::CreateGpuMemoryBuffer( | 94 MockGpuVideoAcceleratorFactories::CreateGpuMemoryBuffer( |
| 95 const gfx::Size& size, | 95 const gfx::Size& size, |
| 96 gfx::BufferFormat format, | 96 gfx::BufferFormat format, |
| 97 gfx::BufferUsage /* usage */) { | 97 gfx::BufferUsage /* usage */) { |
| 98 if (fail_to_allocate_gpu_memory_buffer_) | 98 if (fail_to_allocate_gpu_memory_buffer_) |
| 99 return nullptr; | 99 return nullptr; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 }; | 143 }; |
| 144 } // namespace | 144 } // namespace |
| 145 | 145 |
| 146 std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> | 146 std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> |
| 147 MockGpuVideoAcceleratorFactories::GetGLContextLock() { | 147 MockGpuVideoAcceleratorFactories::GetGLContextLock() { |
| 148 DCHECK(gles2_); | 148 DCHECK(gles2_); |
| 149 return base::MakeUnique<ScopedGLContextLockImpl>(this); | 149 return base::MakeUnique<ScopedGLContextLockImpl>(this); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace media | 152 } // namespace media |
| OLD | NEW |