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

Side by Side Diff: content/renderer/media/rtc_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 | « content/renderer/media/rtc_video_decoder.h ('k') | content/renderer/media/video_capture_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/media/rtc_video_decoder.h" 5 #include "content/renderer/media/rtc_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 if (vda_) 632 if (vda_)
633 vda_->Reset(); 633 vda_->Reset();
634 } 634 }
635 635
636 // static 636 // static
637 void RTCVideoDecoder::ReleaseMailbox( 637 void RTCVideoDecoder::ReleaseMailbox(
638 base::WeakPtr<RTCVideoDecoder> decoder, 638 base::WeakPtr<RTCVideoDecoder> decoder,
639 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories, 639 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories,
640 int64 picture_buffer_id, 640 int64 picture_buffer_id,
641 uint32 texture_id, 641 uint32 texture_id,
642 scoped_ptr<gpu::MailboxHolder> mailbox_holder) { 642 const std::vector<uint32>& release_sync_points) {
643 DCHECK(factories->GetTaskRunner()->BelongsToCurrentThread()); 643 DCHECK(factories->GetTaskRunner()->BelongsToCurrentThread());
644 factories->WaitSyncPoint(mailbox_holder->sync_point); 644
645 for (size_t i = 0; i < release_sync_points.size(); i++)
646 factories->WaitSyncPoint(release_sync_points[i]);
645 647
646 if (decoder) { 648 if (decoder) {
647 decoder->ReusePictureBuffer(picture_buffer_id); 649 decoder->ReusePictureBuffer(picture_buffer_id);
648 return; 650 return;
649 } 651 }
650 // It's the last chance to delete the texture after display, 652 // It's the last chance to delete the texture after display,
651 // because RTCVideoDecoder was destructed. 653 // because RTCVideoDecoder was destructed.
652 factories->DeleteTexture(texture_id); 654 factories->DeleteTexture(texture_id);
653 } 655 }
654 656
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeSuccess", sample); 803 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeSuccess", sample);
802 return status; 804 return status;
803 } 805 }
804 806
805 void RTCVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 807 void RTCVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
806 const { 808 const {
807 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 809 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
808 } 810 }
809 811
810 } // namespace content 812 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_decoder.h ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698