| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const char* LayerTypeAsString() const override; | 57 const char* LayerTypeAsString() const override; |
| 58 | 58 |
| 59 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; | 59 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; |
| 60 | 60 |
| 61 scoped_refptr<media::VideoFrame> frame_; | 61 scoped_refptr<media::VideoFrame> frame_; |
| 62 | 62 |
| 63 media::VideoRotation video_rotation_; | 63 media::VideoRotation video_rotation_; |
| 64 | 64 |
| 65 std::unique_ptr<VideoResourceUpdater> updater_; | 65 std::unique_ptr<VideoResourceUpdater> updater_; |
| 66 VideoFrameExternalResources::ResourceType frame_resource_type_; | 66 VideoFrameExternalResources::ResourceType frame_resource_type_; |
| 67 media::VideoPixelFormat frame_pixel_format_; |
| 67 float frame_resource_offset_; | 68 float frame_resource_offset_; |
| 68 float frame_resource_multiplier_; | 69 float frame_resource_multiplier_; |
| 69 uint32_t frame_bits_per_channel_; | 70 uint32_t frame_bits_per_channel_; |
| 70 | 71 |
| 71 struct FrameResource { | 72 struct FrameResource { |
| 72 FrameResource(ResourceId id, | 73 FrameResource(ResourceId id, |
| 73 gfx::Size size_in_pixels, | 74 gfx::Size size_in_pixels, |
| 74 bool is_overlay_candidate) | 75 bool is_overlay_candidate) |
| 75 : id(id), | 76 : id(id), |
| 76 size_in_pixels(size_in_pixels), | 77 size_in_pixels(size_in_pixels), |
| 77 is_overlay_candidate(is_overlay_candidate) {} | 78 is_overlay_candidate(is_overlay_candidate) {} |
| 78 ResourceId id; | 79 ResourceId id; |
| 79 gfx::Size size_in_pixels; | 80 gfx::Size size_in_pixels; |
| 80 bool is_overlay_candidate; | 81 bool is_overlay_candidate; |
| 81 }; | 82 }; |
| 82 std::vector<FrameResource> frame_resources_; | 83 std::vector<FrameResource> frame_resources_; |
| 83 | 84 |
| 84 // TODO(danakj): Remove these, hide software path inside ResourceProvider and | 85 // TODO(danakj): Remove these, hide software path inside ResourceProvider and |
| 85 // ExternalResource (aka TextureMailbox) classes. | 86 // ExternalResource (aka TextureMailbox) classes. |
| 86 std::vector<unsigned> software_resources_; | 87 std::vector<unsigned> software_resources_; |
| 87 // Called once for each software resource. | 88 // Called once for each software resource. |
| 88 ReleaseCallbackImpl software_release_callback_; | 89 ReleaseCallbackImpl software_release_callback_; |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); | 91 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace cc | 94 } // namespace cc |
| 94 | 95 |
| 95 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ | 96 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ |
| OLD | NEW |