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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2682723003: Make disabling accelerated VPX decoding a GPU driver bug workaround. (Closed)
Patch Set: rebase Created 3 years, 7 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/gpu/ipc/service/gpu_video_decode_accelerator.h ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_video_decode_accelerator.h ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698