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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 (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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 SetTextureCleared(picture); 258 SetTextureCleared(picture);
259 } else { 259 } else {
260 DCHECK(io_task_runner_->BelongsToCurrentThread()); 260 DCHECK(io_task_runner_->BelongsToCurrentThread());
261 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); 261 DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
262 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); 262 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id()));
263 } 263 }
264 264
265 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( 265 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady(
266 host_route_id_, picture.picture_buffer_id(), 266 host_route_id_, picture.picture_buffer_id(),
267 picture.bitstream_buffer_id(), picture.visible_rect(), 267 picture.bitstream_buffer_id(), picture.visible_rect(),
268 picture.allow_overlay()))) { 268 picture.allow_overlay(), picture.size_changed()))) {
269 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; 269 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed";
270 } 270 }
271 } 271 }
272 272
273 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( 273 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer(
274 int32_t bitstream_buffer_id) { 274 int32_t bitstream_buffer_id) {
275 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( 275 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed(
276 host_route_id_, bitstream_buffer_id))) { 276 host_route_id_, bitstream_buffer_id))) {
277 DLOG(ERROR) 277 DLOG(ERROR)
278 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " 278 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) "
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; 616 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second;
617 GLenum target = texture_ref->texture()->target(); 617 GLenum target = texture_ref->texture()->target();
618 gpu::gles2::TextureManager* texture_manager = 618 gpu::gles2::TextureManager* texture_manager =
619 stub_->decoder()->GetContextGroup()->texture_manager(); 619 stub_->decoder()->GetContextGroup()->texture_manager();
620 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 620 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
621 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 621 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
622 uncleared_textures_.erase(it); 622 uncleared_textures_.erase(it);
623 } 623 }
624 624
625 } // namespace content 625 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/avda_state_provider.h ('k') | content/common/gpu/media/media_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698