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

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

Issue 1605423002: Make 'kVideoImageTextureTarget' a list of texture targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 4 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
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 "ui/gfx/buffer_format_util.h" 7 #include "ui/gfx/buffer_format_util.h"
8 #include "ui/gfx/gpu_memory_buffer.h" 8 #include "ui/gfx/gpu_memory_buffer.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 scoped_ptr<VideoEncodeAccelerator> 111 scoped_ptr<VideoEncodeAccelerator>
112 MockGpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator() { 112 MockGpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator() {
113 return scoped_ptr<VideoEncodeAccelerator>(DoCreateVideoEncodeAccelerator()); 113 return scoped_ptr<VideoEncodeAccelerator>(DoCreateVideoEncodeAccelerator());
114 } 114 }
115 115
116 bool MockGpuVideoAcceleratorFactories::ShouldUseGpuMemoryBuffersForVideoFrames() 116 bool MockGpuVideoAcceleratorFactories::ShouldUseGpuMemoryBuffersForVideoFrames()
117 const { 117 const {
118 return false; 118 return false;
119 } 119 }
120 120
121 unsigned MockGpuVideoAcceleratorFactories::ImageTextureTarget() { 121 unsigned MockGpuVideoAcceleratorFactories::ImageTextureTarget(
122 gfx::BufferFormat format) {
122 return GL_TEXTURE_2D; 123 return GL_TEXTURE_2D;
123 } 124 }
124 125
125 namespace { 126 namespace {
126 class ScopedGLContextLockImpl 127 class ScopedGLContextLockImpl
127 : public GpuVideoAcceleratorFactories::ScopedGLContextLock { 128 : public GpuVideoAcceleratorFactories::ScopedGLContextLock {
128 public: 129 public:
129 ScopedGLContextLockImpl(MockGpuVideoAcceleratorFactories* gpu_factories) 130 ScopedGLContextLockImpl(MockGpuVideoAcceleratorFactories* gpu_factories)
130 : gpu_factories_(gpu_factories) {} 131 : gpu_factories_(gpu_factories) {}
131 gpu::gles2::GLES2Interface* ContextGL() override { 132 gpu::gles2::GLES2Interface* ContextGL() override {
132 return gpu_factories_->GetGLES2Interface(); 133 return gpu_factories_->GetGLES2Interface();
133 } 134 }
134 135
135 private: 136 private:
136 MockGpuVideoAcceleratorFactories* gpu_factories_; 137 MockGpuVideoAcceleratorFactories* gpu_factories_;
137 }; 138 };
138 } // namespace 139 } // namespace
139 140
140 scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> 141 scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock>
141 MockGpuVideoAcceleratorFactories::GetGLContextLock() { 142 MockGpuVideoAcceleratorFactories::GetGLContextLock() {
142 DCHECK(gles2_); 143 DCHECK(gles2_);
143 return make_scoped_ptr(new ScopedGLContextLockImpl(this)); 144 return make_scoped_ptr(new ScopedGLContextLockImpl(this));
144 } 145 }
145 146
146 } // namespace media 147 } // 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