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

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

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: Created 4 years, 1 month 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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <array> 8 #include <array>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 picture.picture_buffer_id(), pb.client_texture_ids())), 672 picture.picture_buffer_id(), pb.client_texture_ids())),
673 pb.size(), visible_rect, natural_size, timestamp)); 673 pb.size(), visible_rect, natural_size, timestamp));
674 if (!frame) { 674 if (!frame) {
675 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); 675 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id();
676 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); 676 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE);
677 return; 677 return;
678 } 678 }
679 frame->set_color_space(picture.color_space()); 679 frame->set_color_space(picture.color_space());
680 if (picture.allow_overlay()) 680 if (picture.allow_overlay())
681 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); 681 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true);
682 if (picture.surface_texture())
683 frame->metadata()->SetBoolean(VideoFrameMetadata::SURFACE_TEXTURE, true);
682 #if defined(OS_WIN) 684 #if defined(OS_WIN)
683 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); 685 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true);
684 #endif 686 #endif
685 687
686 if (requires_texture_copy_) 688 if (requires_texture_copy_)
687 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); 689 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true);
688 690
689 CHECK_GT(available_pictures_, 0); 691 CHECK_GT(available_pictures_, 0);
690 --available_pictures_; 692 --available_pictures_;
691 693
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 } 894 }
893 return false; 895 return false;
894 } 896 }
895 897
896 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 898 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
897 const { 899 const {
898 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 900 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
899 } 901 }
900 902
901 } // namespace media 903 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698