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 "media/gpu/ipc/service/gpu_video_decode_accelerator.h" | 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() { | 182 GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() { |
183 // This class can only be self-deleted from OnWillDestroyStub(), which means | 183 // This class can only be self-deleted from OnWillDestroyStub(), which means |
184 // the VDA has already been destroyed in there. | 184 // the VDA has already been destroyed in there. |
185 DCHECK(!video_decode_accelerator_); | 185 DCHECK(!video_decode_accelerator_); |
186 } | 186 } |
187 | 187 |
188 // static | 188 // static |
189 gpu::VideoDecodeAcceleratorCapabilities | 189 gpu::VideoDecodeAcceleratorCapabilities |
190 GpuVideoDecodeAccelerator::GetCapabilities( | 190 GpuVideoDecodeAccelerator::GetCapabilities( |
191 const gpu::GpuPreferences& gpu_preferences) { | 191 const gpu::GpuPreferences& gpu_preferences, |
| 192 const gpu::GpuDriverBugWorkarounds& workarounds) { |
192 return GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities( | 193 return GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities( |
193 gpu_preferences); | 194 gpu_preferences, workarounds); |
194 } | 195 } |
195 | 196 |
196 bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { | 197 bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { |
197 if (!video_decode_accelerator_) | 198 if (!video_decode_accelerator_) |
198 return false; | 199 return false; |
199 | 200 |
200 bool handled = true; | 201 bool handled = true; |
201 IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg) | 202 IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg) |
202 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode) | 203 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode) |
203 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignPictureBuffers, | 204 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignPictureBuffers, |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 for (auto texture_ref : it->second) { | 531 for (auto texture_ref : it->second) { |
531 GLenum target = texture_ref->texture()->target(); | 532 GLenum target = texture_ref->texture()->target(); |
532 gpu::gles2::TextureManager* texture_manager = | 533 gpu::gles2::TextureManager* texture_manager = |
533 stub_->decoder()->GetContextGroup()->texture_manager(); | 534 stub_->decoder()->GetContextGroup()->texture_manager(); |
534 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 535 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
535 } | 536 } |
536 uncleared_textures_.erase(it); | 537 uncleared_textures_.erase(it); |
537 } | 538 } |
538 | 539 |
539 } // namespace media | 540 } // namespace media |
OLD | NEW |