OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SURFACES_SURFACE_AGGREGATOR_H_ | 5 #ifndef CC_SURFACES_SURFACE_AGGREGATOR_H_ |
6 #define CC_SURFACES_SURFACE_AGGREGATOR_H_ | 6 #define CC_SURFACES_SURFACE_AGGREGATOR_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class ResourceProvider; | 22 class ResourceProvider; |
23 class Surface; | 23 class Surface; |
24 class SurfaceDrawQuad; | 24 class SurfaceDrawQuad; |
25 class SurfaceManager; | 25 class SurfaceManager; |
26 | 26 |
27 class CC_SURFACES_EXPORT SurfaceAggregator { | 27 class CC_SURFACES_EXPORT SurfaceAggregator { |
28 public: | 28 public: |
29 SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider); | 29 SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider); |
30 ~SurfaceAggregator(); | 30 ~SurfaceAggregator(); |
31 | 31 |
32 scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); | 32 scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id, |
| 33 std::set<Surface*>* contained_surfaces); |
33 | 34 |
34 private: | 35 private: |
35 RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id, | 36 RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id, |
36 SurfaceId surface_id); | 37 SurfaceId surface_id); |
37 | 38 |
38 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, | 39 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, |
39 RenderPass* dest_pass); | 40 RenderPass* dest_pass); |
40 void CopySharedQuadState(const SharedQuadState* source_sqs, | 41 void CopySharedQuadState(const SharedQuadState* source_sqs, |
41 const gfx::Transform& content_to_target_transform, | 42 const gfx::Transform& content_to_target_transform, |
42 RenderPass* dest_render_pass); | 43 RenderPass* dest_render_pass); |
(...skipping 22 matching lines...) Expand all Loading... |
65 | 66 |
66 // The following state is only valid for the duration of one Aggregate call | 67 // The following state is only valid for the duration of one Aggregate call |
67 // and is only stored on the class to avoid having to pass through every | 68 // and is only stored on the class to avoid having to pass through every |
68 // function call. | 69 // function call. |
69 | 70 |
70 // This is the set of surfaces referenced in the aggregation so far, used to | 71 // This is the set of surfaces referenced in the aggregation so far, used to |
71 // detect cycles. | 72 // detect cycles. |
72 typedef std::set<SurfaceId> SurfaceSet; | 73 typedef std::set<SurfaceId> SurfaceSet; |
73 SurfaceSet referenced_surfaces_; | 74 SurfaceSet referenced_surfaces_; |
74 | 75 |
| 76 std::set<Surface*>* contained_surface_set_; |
| 77 |
75 // This is the pass list for the aggregated frame. | 78 // This is the pass list for the aggregated frame. |
76 RenderPassList* dest_pass_list_; | 79 RenderPassList* dest_pass_list_; |
77 | 80 |
78 // Resource list for the aggregated frame. | 81 // Resource list for the aggregated frame. |
79 TransferableResourceArray* dest_resource_list_; | 82 TransferableResourceArray* dest_resource_list_; |
80 | 83 |
81 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); | 84 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); |
82 }; | 85 }; |
83 | 86 |
84 } // namespace cc | 87 } // namespace cc |
85 | 88 |
86 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ | 89 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ |
OLD | NEW |