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

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

Issue 1885073004: Merge M51: "Disable idle suspend for GpuVideoDecoder produced frames on OSX, Win." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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/blink/webmediaplayer_impl.cc ('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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 &GpuVideoDecoder::ReleaseMailbox, weak_factory_.GetWeakPtr(), 551 &GpuVideoDecoder::ReleaseMailbox, weak_factory_.GetWeakPtr(),
552 factories_, picture.picture_buffer_id(), pb.texture_ids())), 552 factories_, picture.picture_buffer_id(), pb.texture_ids())),
553 pb.size(), visible_rect, natural_size, timestamp)); 553 pb.size(), visible_rect, natural_size, timestamp));
554 if (!frame) { 554 if (!frame) {
555 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); 555 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id();
556 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); 556 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE);
557 return; 557 return;
558 } 558 }
559 if (picture.allow_overlay()) 559 if (picture.allow_overlay())
560 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); 560 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true);
561 #if defined(OS_MACOSX) || defined(OS_WIN)
562 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true);
563 #endif
561 CHECK_GT(available_pictures_, 0); 564 CHECK_GT(available_pictures_, 0);
562 --available_pictures_; 565 --available_pictures_;
563 566
564 bool inserted = 567 bool inserted =
565 picture_buffers_at_display_ 568 picture_buffers_at_display_
566 .insert(std::make_pair(picture.picture_buffer_id(), pb.texture_ids())) 569 .insert(std::make_pair(picture.picture_buffer_id(), pb.texture_ids()))
567 .second; 570 .second;
568 DCHECK(inserted); 571 DCHECK(inserted);
569 572
570 DeliverFrame(frame); 573 DeliverFrame(frame);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 764 }
762 return false; 765 return false;
763 } 766 }
764 767
765 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 768 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
766 const { 769 const {
767 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 770 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
768 } 771 }
769 772
770 } // namespace media 773 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698