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/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "cc/quads/render_pass.h" | 12 #include "cc/quads/render_pass.h" |
| 13 #include "cc/surfaces/surface_id.h" |
13 #include "cc/surfaces/surfaces_export.h" | 14 #include "cc/surfaces/surfaces_export.h" |
14 | 15 |
15 namespace cc { | 16 namespace cc { |
16 | 17 |
17 class CompositorFrame; | 18 class CompositorFrame; |
18 class DelegatedFrameData; | 19 class DelegatedFrameData; |
19 class SurfaceDrawQuad; | 20 class SurfaceDrawQuad; |
20 class SurfaceManager; | 21 class SurfaceManager; |
21 | 22 |
22 class CC_SURFACES_EXPORT SurfaceAggregator { | 23 class CC_SURFACES_EXPORT SurfaceAggregator { |
23 public: | 24 public: |
24 explicit SurfaceAggregator(SurfaceManager* manager); | 25 explicit SurfaceAggregator(SurfaceManager* manager); |
25 ~SurfaceAggregator(); | 26 ~SurfaceAggregator(); |
26 | 27 |
27 scoped_ptr<CompositorFrame> Aggregate(int surface_id); | 28 scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); |
28 | 29 |
29 private: | 30 private: |
30 DelegatedFrameData* GetReferencedDataForSurfaceID(int surface_id); | 31 DelegatedFrameData* GetReferencedDataForSurfaceId(SurfaceId surface_id); |
31 RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id, | 32 RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id, |
32 int surface_id); | 33 int surface_id); |
33 | 34 |
34 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, | 35 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, |
35 RenderPass* dest_pass); | 36 RenderPass* dest_pass); |
36 void CopySharedQuadState(const SharedQuadState* source_sqs, | 37 void CopySharedQuadState(const SharedQuadState* source_sqs, |
37 const gfx::Transform& content_to_target_transform, | 38 const gfx::Transform& content_to_target_transform, |
38 RenderPass* dest_render_pass); | 39 RenderPass* dest_render_pass); |
39 void CopyQuadsToPass(const QuadList& source_quad_list, | 40 void CopyQuadsToPass(const QuadList& source_quad_list, |
40 const SharedQuadStateList& source_shared_quad_state_list, | 41 const SharedQuadStateList& source_shared_quad_state_list, |
(...skipping 19 matching lines...) Expand all Loading... |
60 | 61 |
61 // This is the pass list for the aggregated frame. | 62 // This is the pass list for the aggregated frame. |
62 RenderPassList* dest_pass_list_; | 63 RenderPassList* dest_pass_list_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); | 65 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace cc | 68 } // namespace cc |
68 | 69 |
69 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ | 70 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ |
OLD | NEW |