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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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
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 "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 DVLOG(1) << __FUNCTION__; 912 DVLOG(1) << __FUNCTION__;
913 913
914 pipeline_metadata_ = metadata; 914 pipeline_metadata_ = metadata;
915 915
916 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation, 916 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation,
917 VIDEO_ROTATION_MAX + 1); 917 VIDEO_ROTATION_MAX + 1);
918 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); 918 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
919 919
920 if (hasVideo()) { 920 if (hasVideo()) {
921 DCHECK(!video_weblayer_); 921 DCHECK(!video_weblayer_);
922 scoped_refptr<cc::VideoLayer> layer = cc::VideoLayer::Create( 922 scoped_refptr<cc::VideoLayer> layer =
923 cc::LayerSettings(), compositor_, pipeline_metadata_.video_rotation); 923 cc::VideoLayer::Create(compositor_, pipeline_metadata_.video_rotation);
924 924
925 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 || 925 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 ||
926 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) { 926 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) {
927 gfx::Size size = pipeline_metadata_.natural_size; 927 gfx::Size size = pipeline_metadata_.natural_size;
928 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width()); 928 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width());
929 } 929 }
930 930
931 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer)); 931 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer));
932 video_weblayer_->layer()->SetContentsOpaque(opaque_); 932 video_weblayer_->layer()->SetContentsOpaque(opaque_);
933 video_weblayer_->SetContentsOpaqueIsFixed(true); 933 video_weblayer_->SetContentsOpaqueIsFixed(true);
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1428 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1429 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1429 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1430 << ", Demuxer: " << demuxer_memory_usage; 1430 << ", Demuxer: " << demuxer_memory_usage;
1431 1431
1432 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1432 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1433 last_reported_memory_usage_ = current_memory_usage; 1433 last_reported_memory_usage_ = current_memory_usage;
1434 adjust_allocated_memory_cb_.Run(delta); 1434 adjust_allocated_memory_cb_.Run(delta);
1435 } 1435 }
1436 1436
1437 } // namespace media 1437 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698