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

Side by Side Diff: cc/layers/video_layer_impl.h

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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_LAYERS_VIDEO_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_VIDEO_LAYER_IMPL_H_
6 #define CC_LAYERS_VIDEO_LAYER_IMPL_H_ 6 #define CC_LAYERS_VIDEO_LAYER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/layers/layer_impl.h" 11 #include "cc/layers/layer_impl.h"
12 #include "cc/resources/release_callback.h" 12 #include "cc/resources/release_callback.h"
13 #include "cc/resources/video_resource_updater.h" 13 #include "cc/resources/video_resource_updater.h"
14 #include "media/base/video_rotation.h"
14 15
15 namespace media { 16 namespace media {
16 class VideoFrame; 17 class VideoFrame;
17 } 18 }
18 19
19 namespace cc { 20 namespace cc {
20 class VideoFrameProvider; 21 class VideoFrameProvider;
21 class VideoFrameProviderClientImpl; 22 class VideoFrameProviderClientImpl;
22 23
23 class CC_EXPORT VideoLayerImpl : public LayerImpl { 24 class CC_EXPORT VideoLayerImpl : public LayerImpl {
(...skipping 11 matching lines...) Expand all
35 ResourceProvider* resource_provider) OVERRIDE; 36 ResourceProvider* resource_provider) OVERRIDE;
36 virtual void AppendQuads(RenderPass* render_pass, 37 virtual void AppendQuads(RenderPass* render_pass,
37 const OcclusionTracker<LayerImpl>& occlusion_tracker, 38 const OcclusionTracker<LayerImpl>& occlusion_tracker,
38 AppendQuadsData* append_quads_data) OVERRIDE; 39 AppendQuadsData* append_quads_data) OVERRIDE;
39 virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE; 40 virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE;
40 virtual void DidBecomeActive() OVERRIDE; 41 virtual void DidBecomeActive() OVERRIDE;
41 virtual void ReleaseResources() OVERRIDE; 42 virtual void ReleaseResources() OVERRIDE;
42 43
43 void SetNeedsRedraw(); 44 void SetNeedsRedraw();
44 45
46 inline void set_video_rotation(media::VideoRotation video_rotation) {
47 video_rotation_ = video_rotation;
48 NoteLayerPropertyChanged();
49 }
50
51 inline media::VideoRotation get_video_rotation() { return video_rotation_; }
enne (OOO) 2014/07/22 21:10:40 style nit: drop the get_
52
45 void SetProviderClientImpl( 53 void SetProviderClientImpl(
46 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl); 54 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl);
47 55
48 private: 56 private:
49 VideoLayerImpl(LayerTreeImpl* tree_impl, int id); 57 VideoLayerImpl(LayerTreeImpl* tree_impl, int id);
50 58
51 virtual const char* LayerTypeAsString() const OVERRIDE; 59 virtual const char* LayerTypeAsString() const OVERRIDE;
52 60
53 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; 61 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_;
54 62
55 scoped_refptr<media::VideoFrame> frame_; 63 scoped_refptr<media::VideoFrame> frame_;
56 64
65 media::VideoRotation video_rotation_;
66
57 scoped_ptr<VideoResourceUpdater> updater_; 67 scoped_ptr<VideoResourceUpdater> updater_;
58 VideoFrameExternalResources::ResourceType frame_resource_type_; 68 VideoFrameExternalResources::ResourceType frame_resource_type_;
59 std::vector<ResourceProvider::ResourceId> frame_resources_; 69 std::vector<ResourceProvider::ResourceId> frame_resources_;
60 70
61 // TODO(danakj): Remove these, hide software path inside ResourceProvider and 71 // TODO(danakj): Remove these, hide software path inside ResourceProvider and
62 // ExternalResource (aka TextureMailbox) classes. 72 // ExternalResource (aka TextureMailbox) classes.
63 std::vector<unsigned> software_resources_; 73 std::vector<unsigned> software_resources_;
64 // Called once for each software resource. 74 // Called once for each software resource.
65 ReleaseCallback software_release_callback_; 75 ReleaseCallback software_release_callback_;
66 76
67 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); 77 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl);
68 }; 78 };
69 79
70 } // namespace cc 80 } // namespace cc
71 81
72 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ 82 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698