OLD | NEW |
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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 private: | 60 private: |
61 VideoLayerImpl(LayerTreeImpl* tree_impl, int id); | 61 VideoLayerImpl(LayerTreeImpl* tree_impl, int id); |
62 | 62 |
63 virtual const char* LayerTypeAsString() const OVERRIDE; | 63 virtual const char* LayerTypeAsString() const OVERRIDE; |
64 | 64 |
65 void WillDrawInternal(ResourceProvider* resource_provider); | 65 void WillDrawInternal(ResourceProvider* resource_provider); |
66 bool SetupFramePlanes(ResourceProvider* resource_provider); | 66 bool SetupFramePlanes(ResourceProvider* resource_provider); |
67 void FreeFramePlanes(ResourceProvider* resource_provider); | 67 void FreeFramePlanes(ResourceProvider* resource_provider); |
68 void FreeUnusedFramePlanes(ResourceProvider* resource_provider); | 68 void FreeUnusedFramePlanes(ResourceProvider* resource_provider); |
69 size_t NumPlanes() const; | |
70 | 69 |
71 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; | 70 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; |
72 | 71 |
73 scoped_refptr<media::VideoFrame> frame_; | 72 scoped_refptr<media::VideoFrame> frame_; |
74 media::VideoFrame::Format format_; | 73 media::VideoFrame::Format format_; |
75 bool convert_yuv_; | 74 bool convert_yuv_; |
76 ResourceProvider::ResourceId external_texture_resource_; | 75 ResourceProvider::ResourceId external_texture_resource_; |
77 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; | 76 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; |
78 | 77 |
79 // Each index in this array corresponds to a plane in media::VideoFrame. | 78 // Each index in this array corresponds to a plane in media::VideoFrame. |
80 FramePlane frame_planes_[media::VideoFrame::kMaxPlanes]; | 79 FramePlane frame_planes_[media::VideoFrame::kMaxPlanes]; |
81 | 80 |
82 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); | 81 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); |
83 }; | 82 }; |
84 | 83 |
85 } // namespace cc | 84 } // namespace cc |
86 | 85 |
87 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ | 86 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ |
OLD | NEW |