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

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

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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 | « content/test/layouttest_support.cc ('k') | ui/compositor/compositor.cc » ('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 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 10
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 770
771 pipeline_metadata_ = metadata; 771 pipeline_metadata_ = metadata;
772 772
773 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation, 773 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation,
774 VIDEO_ROTATION_MAX + 1); 774 VIDEO_ROTATION_MAX + 1);
775 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); 775 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
776 776
777 if (hasVideo()) { 777 if (hasVideo()) {
778 DCHECK(!video_weblayer_); 778 DCHECK(!video_weblayer_);
779 scoped_refptr<cc::VideoLayer> layer = 779 scoped_refptr<cc::VideoLayer> layer =
780 cc::VideoLayer::Create(compositor_, pipeline_metadata_.video_rotation); 780 cc::VideoLayer::Create(cc_blink::WebLayerImpl::LayerSettings(),
781 compositor_, pipeline_metadata_.video_rotation);
781 782
782 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 || 783 if (pipeline_metadata_.video_rotation == VIDEO_ROTATION_90 ||
783 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) { 784 pipeline_metadata_.video_rotation == VIDEO_ROTATION_270) {
784 gfx::Size size = pipeline_metadata_.natural_size; 785 gfx::Size size = pipeline_metadata_.natural_size;
785 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width()); 786 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width());
786 } 787 }
787 788
788 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer)); 789 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer));
789 video_weblayer_->setOpaque(opaque_); 790 video_weblayer_->setOpaque(opaque_);
790 client_->setWebLayer(video_weblayer_.get()); 791 client_->setWebLayer(video_weblayer_.get());
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 1011
1011 // pause() may be called after playback has ended and the HTMLMediaElement 1012 // pause() may be called after playback has ended and the HTMLMediaElement
1012 // requires that currentTime() == duration() after ending. We want to ensure 1013 // requires that currentTime() == duration() after ending. We want to ensure
1013 // |paused_time_| matches currentTime() in this case or a future seek() may 1014 // |paused_time_| matches currentTime() in this case or a future seek() may
1014 // incorrectly discard what it thinks is a seek to the existing time. 1015 // incorrectly discard what it thinks is a seek to the existing time.
1015 paused_time_ = 1016 paused_time_ =
1016 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime(); 1017 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime();
1017 } 1018 }
1018 1019
1019 } // namespace media 1020 } // namespace media
OLDNEW
« no previous file with comments | « content/test/layouttest_support.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698