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

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

Issue 2182183007: Handle scaling frames in RTCVideoEncoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: posciak@ comments. Created 4 years, 4 months 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
« no previous file with comments | « media/media.gyp ('k') | media/video/mock_video_encode_accelerator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 const gfx::Size& size, 94 const gfx::Size& size,
95 gfx::BufferFormat format, 95 gfx::BufferFormat format,
96 gfx::BufferUsage /* usage */) { 96 gfx::BufferUsage /* usage */) {
97 if (fail_to_allocate_gpu_memory_buffer_) 97 if (fail_to_allocate_gpu_memory_buffer_)
98 return nullptr; 98 return nullptr;
99 return base::WrapUnique(new GpuMemoryBufferImpl(size, format)); 99 return base::WrapUnique(new GpuMemoryBufferImpl(size, format));
100 } 100 }
101 101
102 std::unique_ptr<base::SharedMemory> 102 std::unique_ptr<base::SharedMemory>
103 MockGpuVideoAcceleratorFactories::CreateSharedMemory(size_t size) { 103 MockGpuVideoAcceleratorFactories::CreateSharedMemory(size_t size) {
104 std::unique_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
105 if (shared_memory->CreateAndMapAnonymous(size))
106 return shared_memory;
104 return nullptr; 107 return nullptr;
105 } 108 }
106 109
107 std::unique_ptr<VideoDecodeAccelerator> 110 std::unique_ptr<VideoDecodeAccelerator>
108 MockGpuVideoAcceleratorFactories::CreateVideoDecodeAccelerator() { 111 MockGpuVideoAcceleratorFactories::CreateVideoDecodeAccelerator() {
109 return base::WrapUnique(DoCreateVideoDecodeAccelerator()); 112 return base::WrapUnique(DoCreateVideoDecodeAccelerator());
110 } 113 }
111 114
112 std::unique_ptr<VideoEncodeAccelerator> 115 std::unique_ptr<VideoEncodeAccelerator>
113 MockGpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator() { 116 MockGpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator() {
(...skipping 25 matching lines...) Expand all
139 }; 142 };
140 } // namespace 143 } // namespace
141 144
142 std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> 145 std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock>
143 MockGpuVideoAcceleratorFactories::GetGLContextLock() { 146 MockGpuVideoAcceleratorFactories::GetGLContextLock() {
144 DCHECK(gles2_); 147 DCHECK(gles2_);
145 return base::WrapUnique(new ScopedGLContextLockImpl(this)); 148 return base::WrapUnique(new ScopedGLContextLockImpl(this));
146 } 149 }
147 150
148 } // namespace media 151 } // namespace media
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/video/mock_video_encode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698