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

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

Issue 2656183002: Change effect of flag kDisableAcceleratedVideoDecode to only affect decode
Patch Set: Created 3 years, 11 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/renderers/mock_gpu_video_accelerator_factories.h ('k') | no next file » | 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698