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

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: Fix compilation. 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 DVLOG(1) << __FUNCTION__; 987 DVLOG(1) << __FUNCTION__;
988 988
989 pipeline_metadata_ = metadata; 989 pipeline_metadata_ = metadata;
990 990
991 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation, 991 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation,
992 VIDEO_ROTATION_MAX + 1); 992 VIDEO_ROTATION_MAX + 1);
993 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); 993 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
994 994
995 if (hasVideo()) { 995 if (hasVideo()) {
996 DCHECK(!video_weblayer_); 996 DCHECK(!video_weblayer_);
997 scoped_refptr<cc::VideoLayer> layer = 997 scoped_refptr<cc::VideoLayer> layer = cc::VideoLayer::Create(
998 cc::VideoLayer::Create(cc_blink::WebLayerImpl::LayerSettings(), 998 cc::LayerSettings(), compositor_, pipeline_metadata_.video_rotation);
999 compositor_, pipeline_metadata_.video_rotation);
1000 999
1001 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 || 1000 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 ||
1002 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) { 1001 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) {
1003 gfx::Size size = pipeline_metadata_.natural_size; 1002 gfx::Size size = pipeline_metadata_.natural_size;
1004 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width()); 1003 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width());
1005 } 1004 }
1006 1005
1007 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer)); 1006 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer));
1008 video_weblayer_->layer()->SetContentsOpaque(opaque_); 1007 video_weblayer_->layer()->SetContentsOpaque(opaque_);
1009 video_weblayer_->SetContentsOpaqueIsFixed(true); 1008 video_weblayer_->SetContentsOpaqueIsFixed(true);
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1579 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1581 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1580 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1582 << ", Demuxer: " << demuxer_memory_usage; 1581 << ", Demuxer: " << demuxer_memory_usage;
1583 1582
1584 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1583 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1585 last_reported_memory_usage_ = current_memory_usage; 1584 last_reported_memory_usage_ = current_memory_usage;
1586 adjust_allocated_memory_cb_.Run(delta); 1585 adjust_allocated_memory_cb_.Run(delta);
1587 } 1586 }
1588 1587
1589 } // namespace media 1588 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698