Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: media/renderers/mock_gpu_video_accelerator_factories.cc

Issue 2526683002: gpu: Rename AllocateGpuMemoryBuffer to CreateGpuMemoryBuffer. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::IsGpuVideoAcceleratorEnabled() {
90 return true; 90 return true;
91 } 91 }
92 92
93 std::unique_ptr<gfx::GpuMemoryBuffer> 93 std::unique_ptr<gfx::GpuMemoryBuffer>
94 MockGpuVideoAcceleratorFactories::AllocateGpuMemoryBuffer( 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;
100 return base::MakeUnique<GpuMemoryBufferImpl>(size, format); 100 return base::MakeUnique<GpuMemoryBufferImpl>(size, format);
101 } 101 }
102 102
103 std::unique_ptr<base::SharedMemory> 103 std::unique_ptr<base::SharedMemory>
104 MockGpuVideoAcceleratorFactories::CreateSharedMemory(size_t size) { 104 MockGpuVideoAcceleratorFactories::CreateSharedMemory(size_t size) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « media/renderers/mock_gpu_video_accelerator_factories.h ('k') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698