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

Unified Diff: cc/layers/video_layer.cc

Issue 388643002: Rotation into Video Layer + Content Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting Created 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/video_layer.cc
diff --git a/cc/layers/video_layer.cc b/cc/layers/video_layer.cc
index 4ddfdae69a64f9f4514b7d18be20d1083ba7a1fe..5adf11cd2e2b3d644f44673065bef88f05cbd8de 100644
--- a/cc/layers/video_layer.cc
+++ b/cc/layers/video_layer.cc
@@ -19,7 +19,10 @@ VideoLayer::VideoLayer(VideoFrameProvider* provider) : provider_(provider) {
VideoLayer::~VideoLayer() {}
scoped_ptr<LayerImpl> VideoLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
- return VideoLayerImpl::Create(tree_impl, id(), provider_).PassAs<LayerImpl>();
+ scoped_ptr<VideoLayerImpl> impl =
+ VideoLayerImpl::Create(tree_impl, id(), provider_);
+ impl->set_video_rotation(video_rotation_);
scherkus (not reviewing) 2014/07/11 18:54:07 if this is the only way to create a VideoLayerImpl
danakj 2014/07/11 21:04:28 This is the wrong place to do this, override PushP
+ return impl.PassAs<LayerImpl>();
}
bool VideoLayer::Update(ResourceUpdateQueue* queue,
@@ -36,4 +39,8 @@ bool VideoLayer::Update(ResourceUpdateQueue* queue,
return updated;
}
+void VideoLayer::set_video_rotation(media::VideoRotation video_rotation) {
+ video_rotation_ = video_rotation;
+}
danakj 2014/07/11 21:04:28 This should call SetNeedsCommit();
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698