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

Side by Side Diff: media/gpu/gpu_video_decode_accelerator_factory.cc

Issue 2495753002: Reenable idle suspension of media elements on Windows. (Closed)
Patch Set: add comment Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/gpu/gpu_video_decode_accelerator_factory.h" 5 #include "media/gpu/gpu_video_decode_accelerator_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "gpu/command_buffer/service/gpu_preferences.h" 8 #include "gpu/command_buffer/service/gpu_preferences.h"
9 #include "media/gpu/gpu_video_accelerator_util.h" 9 #include "media/gpu/gpu_video_accelerator_util.h"
10 #include "media/gpu/media_gpu_export.h" 10 #include "media/gpu/media_gpu_export.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 #if defined(OS_WIN) 156 #if defined(OS_WIN)
157 std::unique_ptr<VideoDecodeAccelerator> 157 std::unique_ptr<VideoDecodeAccelerator>
158 GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA( 158 GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA(
159 const gpu::GpuDriverBugWorkarounds& workarounds, 159 const gpu::GpuDriverBugWorkarounds& workarounds,
160 const gpu::GpuPreferences& gpu_preferences) const { 160 const gpu::GpuPreferences& gpu_preferences) const {
161 std::unique_ptr<VideoDecodeAccelerator> decoder; 161 std::unique_ptr<VideoDecodeAccelerator> decoder;
162 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { 162 if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
163 DVLOG(0) << "Initializing DXVA HW decoder for windows."; 163 DVLOG(0) << "Initializing DXVA HW decoder for windows.";
164 decoder.reset(new DXVAVideoDecodeAccelerator(get_gl_context_cb_, 164 decoder.reset(new DXVAVideoDecodeAccelerator(
165 make_context_current_cb_, 165 get_gl_context_cb_, make_context_current_cb_, bind_image_cb_,
166 workarounds, gpu_preferences)); 166 workarounds, gpu_preferences));
167 } 167 }
168 return decoder; 168 return decoder;
169 } 169 }
170 #endif 170 #endif
171 171
172 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) 172 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
173 std::unique_ptr<VideoDecodeAccelerator> 173 std::unique_ptr<VideoDecodeAccelerator>
174 GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA( 174 GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA(
175 const gpu::GpuDriverBugWorkarounds& workarounds, 175 const gpu::GpuDriverBugWorkarounds& workarounds,
176 const gpu::GpuPreferences& gpu_preferences) const { 176 const gpu::GpuPreferences& gpu_preferences) const {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 const BindGLImageCallback& bind_image_cb, 241 const BindGLImageCallback& bind_image_cb,
242 const GetGLES2DecoderCallback& get_gles2_decoder_cb) 242 const GetGLES2DecoderCallback& get_gles2_decoder_cb)
243 : get_gl_context_cb_(get_gl_context_cb), 243 : get_gl_context_cb_(get_gl_context_cb),
244 make_context_current_cb_(make_context_current_cb), 244 make_context_current_cb_(make_context_current_cb),
245 bind_image_cb_(bind_image_cb), 245 bind_image_cb_(bind_image_cb),
246 get_gles2_decoder_cb_(get_gles2_decoder_cb) {} 246 get_gles2_decoder_cb_(get_gles2_decoder_cb) {}
247 247
248 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} 248 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {}
249 249
250 } // namespace media 250 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/dxva_video_decode_accelerator_win.cc ('k') | media/gpu/ipc/service/gpu_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698