OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/gpu/media/gpu_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 return; | 259 return; |
260 } | 260 } |
261 #endif | 261 #endif |
262 | 262 |
263 #if defined(OS_WIN) | 263 #if defined(OS_WIN) |
264 if (base::win::GetVersion() < base::win::VERSION_WIN7) { | 264 if (base::win::GetVersion() < base::win::VERSION_WIN7) { |
265 NOTIMPLEMENTED() << "HW video decode acceleration not available."; | 265 NOTIMPLEMENTED() << "HW video decode acceleration not available."; |
266 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 266 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
267 return; | 267 return; |
268 } | 268 } |
269 DLOG(INFO) << "Initializing DXVA HW decoder for windows."; | 269 DVLOG(0) << "Initializing DXVA HW decoder for windows."; |
270 video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator( | 270 video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator( |
271 this, make_context_current_)); | 271 this, make_context_current_)); |
272 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) | 272 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
273 video_decode_accelerator_.reset(new ExynosVideoDecodeAccelerator( | 273 video_decode_accelerator_.reset(new ExynosVideoDecodeAccelerator( |
274 gfx::GLSurfaceEGL::GetHardwareDisplay(), | 274 gfx::GLSurfaceEGL::GetHardwareDisplay(), |
275 stub_->decoder()->GetGLContext()->GetHandle(), | 275 stub_->decoder()->GetGLContext()->GetHandle(), |
276 this, | 276 this, |
277 weak_factory_for_io_.GetWeakPtr(), | 277 weak_factory_for_io_.GetWeakPtr(), |
278 make_context_current_, | 278 make_context_current_, |
279 io_message_loop_)); | 279 io_message_loop_)); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; | 493 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; |
494 GLenum target = texture_ref->texture()->target(); | 494 GLenum target = texture_ref->texture()->target(); |
495 gpu::gles2::TextureManager* texture_manager = | 495 gpu::gles2::TextureManager* texture_manager = |
496 stub_->decoder()->GetContextGroup()->texture_manager(); | 496 stub_->decoder()->GetContextGroup()->texture_manager(); |
497 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 497 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
498 texture_manager->SetLevelCleared(texture_ref, target, 0, true); | 498 texture_manager->SetLevelCleared(texture_ref, target, 0, true); |
499 uncleared_textures_.erase(it); | 499 uncleared_textures_.erase(it); |
500 } | 500 } |
501 | 501 |
502 } // namespace content | 502 } // namespace content |
OLD | NEW |