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

Side by Side Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2163513002: Add FramesSentAsOverlay UMA metric to AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed boolean description Created 4 years, 5 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "media/gpu/android_video_decode_accelerator.h" 5 #include "media/gpu/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 932
933 bool size_changed = false; 933 bool size_changed = false;
934 if (i->second.size() != size_) { 934 if (i->second.size() != size_) {
935 // Size may have changed due to resolution change since the last time this 935 // Size may have changed due to resolution change since the last time this
936 // PictureBuffer was used. 936 // PictureBuffer was used.
937 strategy_->UpdatePictureBufferSize(&i->second, size_); 937 strategy_->UpdatePictureBufferSize(&i->second, size_);
938 size_changed = true; 938 size_changed = true;
939 } 939 }
940 940
941 const bool allow_overlay = strategy_->ArePicturesOverlayable(); 941 const bool allow_overlay = strategy_->ArePicturesOverlayable();
942 UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", allow_overlay);
942 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_), 943 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_),
943 allow_overlay); 944 allow_overlay);
944 picture.set_size_changed(size_changed); 945 picture.set_size_changed(size_changed);
945 946
946 // Notify picture ready before calling UseCodecBufferForPictureBuffer() since 947 // Notify picture ready before calling UseCodecBufferForPictureBuffer() since
947 // that process may be slow and shouldn't delay delivery of the frame to the 948 // that process may be slow and shouldn't delay delivery of the frame to the
948 // renderer. The picture is only used on the same thread as this method is 949 // renderer. The picture is only used on the same thread as this method is
949 // called, so it is safe to do this. 950 // called, so it is safe to do this.
950 NotifyPictureReady(picture); 951 NotifyPictureReady(picture);
951 952
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 1775
1775 bool AndroidVideoDecodeAccelerator::IsMediaCodecSoftwareDecodingForbidden() 1776 bool AndroidVideoDecodeAccelerator::IsMediaCodecSoftwareDecodingForbidden()
1776 const { 1777 const {
1777 // Prevent MediaCodec from using its internal software decoders when we have 1778 // Prevent MediaCodec from using its internal software decoders when we have
1778 // more secure and up to date versions in the renderer process. 1779 // more secure and up to date versions in the renderer process.
1779 return !config_.is_encrypted && (codec_config_->codec_ == media::kCodecVP8 || 1780 return !config_.is_encrypted && (codec_config_->codec_ == media::kCodecVP8 ||
1780 codec_config_->codec_ == media::kCodecVP9); 1781 codec_config_->codec_ == media::kCodecVP9);
1781 } 1782 }
1782 1783
1783 } // namespace media 1784 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698