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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 175223003: HW Video: Make media::VideoFrame handle the sync point of the compositor as well as webgl (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: rebase to ToT Created 6 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/filters/gpu_video_decoder.h ('k') | no next file » | 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/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 .Run(kOk, ready_video_frames_.front()); 494 .Run(kOk, ready_video_frames_.front());
495 ready_video_frames_.pop_front(); 495 ready_video_frames_.pop_front();
496 } 496 }
497 497
498 // static 498 // static
499 void GpuVideoDecoder::ReleaseMailbox( 499 void GpuVideoDecoder::ReleaseMailbox(
500 base::WeakPtr<GpuVideoDecoder> decoder, 500 base::WeakPtr<GpuVideoDecoder> decoder,
501 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories, 501 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories,
502 int64 picture_buffer_id, 502 int64 picture_buffer_id,
503 uint32 texture_id, 503 uint32 texture_id,
504 scoped_ptr<gpu::MailboxHolder> mailbox_holder) { 504 const std::vector<uint32>& release_sync_points) {
505 DCHECK(factories->GetTaskRunner()->BelongsToCurrentThread()); 505 DCHECK(factories->GetTaskRunner()->BelongsToCurrentThread());
506 factories->WaitSyncPoint(mailbox_holder->sync_point); 506
507 for (size_t i = 0; i < release_sync_points.size(); i++)
508 factories->WaitSyncPoint(release_sync_points[i]);
507 509
508 if (decoder) { 510 if (decoder) {
509 decoder->ReusePictureBuffer(picture_buffer_id); 511 decoder->ReusePictureBuffer(picture_buffer_id);
510 return; 512 return;
511 } 513 }
512 // It's the last chance to delete the texture after display, 514 // It's the last chance to delete the texture after display,
513 // because GpuVideoDecoder was destructed. 515 // because GpuVideoDecoder was destructed.
514 factories->DeleteTexture(texture_id); 516 factories->DeleteTexture(texture_id);
515 } 517 }
516 518
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 return; 639 return;
638 } 640 }
639 } 641 }
640 642
641 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 643 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
642 const { 644 const {
643 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 645 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
644 } 646 }
645 647
646 } // namespace media 648 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698