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

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

Issue 1739743003: Blink Compositor Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude histograms.xml 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 DVLOG(1) << __FUNCTION__; 993 DVLOG(1) << __FUNCTION__;
994 994
995 pipeline_metadata_ = metadata; 995 pipeline_metadata_ = metadata;
996 996
997 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation, 997 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation,
998 VIDEO_ROTATION_MAX + 1); 998 VIDEO_ROTATION_MAX + 1);
999 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); 999 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
1000 1000
1001 if (hasVideo()) { 1001 if (hasVideo()) {
1002 DCHECK(!video_weblayer_); 1002 DCHECK(!video_weblayer_);
1003 scoped_refptr<cc::VideoLayer> layer = 1003 scoped_refptr<cc::VideoLayer> layer = cc::VideoLayer::Create(
1004 cc::VideoLayer::Create(cc_blink::WebLayerImpl::LayerSettings(), 1004 cc::LayerSettings(), compositor_, pipeline_metadata_.video_rotation);
1005 compositor_, pipeline_metadata_.video_rotation);
1006 1005
1007 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 || 1006 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 ||
1008 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) { 1007 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) {
1009 gfx::Size size = pipeline_metadata_.natural_size; 1008 gfx::Size size = pipeline_metadata_.natural_size;
1010 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width()); 1009 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width());
1011 } 1010 }
1012 1011
1013 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer)); 1012 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer));
1014 video_weblayer_->layer()->SetContentsOpaque(opaque_); 1013 video_weblayer_->layer()->SetContentsOpaque(opaque_);
1015 video_weblayer_->SetContentsOpaqueIsFixed(true); 1014 video_weblayer_->SetContentsOpaqueIsFixed(true);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1596 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1598 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1597 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1599 << ", Demuxer: " << demuxer_memory_usage; 1598 << ", Demuxer: " << demuxer_memory_usage;
1600 1599
1601 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1600 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1602 last_reported_memory_usage_ = current_memory_usage; 1601 last_reported_memory_usage_ = current_memory_usage;
1603 adjust_allocated_memory_cb_.Run(delta); 1602 adjust_allocated_memory_cb_.Run(delta);
1604 } 1603 }
1605 1604
1606 } // namespace media 1605 } // namespace media
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | third_party/WebKit/Source/core/animation/Animation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698