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

Side by Side 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: Removed uneeded parameter. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "cc/layers/video_layer.h" 5 #include "cc/layers/video_layer.h"
6 6
7 #include "cc/layers/video_layer_impl.h" 7 #include "cc/layers/video_layer_impl.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 scoped_refptr<VideoLayer> VideoLayer::Create(VideoFrameProvider* provider) { 11 scoped_refptr<VideoLayer> VideoLayer::Create(VideoFrameProvider* provider) {
12 return make_scoped_refptr(new VideoLayer(provider)); 12 return make_scoped_refptr(new VideoLayer(provider));
13 } 13 }
14 14
15 VideoLayer::VideoLayer(VideoFrameProvider* provider) : provider_(provider) { 15 VideoLayer::VideoLayer(VideoFrameProvider* provider) : provider_(provider) {
16 DCHECK(provider_); 16 DCHECK(provider_);
17 } 17 }
18 18
19 VideoLayer::~VideoLayer() {} 19 VideoLayer::~VideoLayer() {}
20 20
21 scoped_ptr<LayerImpl> VideoLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { 21 scoped_ptr<LayerImpl> VideoLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
22 return VideoLayerImpl::Create(tree_impl, id(), provider_).PassAs<LayerImpl>(); 22 scoped_ptr<VideoLayerImpl> impl =
23 VideoLayerImpl::Create(tree_impl, id(), provider_);
24 impl->set_video_rotation(video_rotation_);
enne (OOO) 2014/07/21 23:42:49 This should be set during PushProperties.
suderman 2014/07/22 00:05:20 I am willing to make this change however it has mo
enne (OOO) 2014/07/22 21:10:39 Yeah, I disagree with what Dana said. video_rotat
suderman 2014/07/22 21:48:16 If the video source changes it's metadata will sti
25 return impl.PassAs<LayerImpl>();
23 } 26 }
24 27
25 bool VideoLayer::Update(ResourceUpdateQueue* queue, 28 bool VideoLayer::Update(ResourceUpdateQueue* queue,
26 const OcclusionTracker<Layer>* occlusion) { 29 const OcclusionTracker<Layer>* occlusion) {
27 bool updated = Layer::Update(queue, occlusion); 30 bool updated = Layer::Update(queue, occlusion);
28 31
29 // Video layer doesn't update any resources from the main thread side, 32 // Video layer doesn't update any resources from the main thread side,
30 // but repaint rects need to be sent to the VideoLayerImpl via commit. 33 // but repaint rects need to be sent to the VideoLayerImpl via commit.
31 // 34 //
32 // This is the inefficient legacy redraw path for videos. It's better to 35 // This is the inefficient legacy redraw path for videos. It's better to
33 // communicate this directly to the VideoLayerImpl. 36 // communicate this directly to the VideoLayerImpl.
34 updated |= !update_rect_.IsEmpty(); 37 updated |= !update_rect_.IsEmpty();
35 38
36 return updated; 39 return updated;
37 } 40 }
38 41
39 } // namespace cc 42 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698