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 14 matching lines...) Expand all Loading... |
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 typedef base::hash_map<SurfaceId, int> SurfaceIndexMap; | 29 typedef base::hash_map<SurfaceId, int> SurfaceIndexMap; |
30 | 30 |
31 SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider); | 31 SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider); |
32 ~SurfaceAggregator(); | 32 ~SurfaceAggregator(); |
33 | 33 |
34 scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); | 34 scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); |
| 35 void ReleaseResources(SurfaceId surface_id); |
35 SurfaceIndexMap& previous_contained_surfaces() { | 36 SurfaceIndexMap& previous_contained_surfaces() { |
36 return previous_contained_surfaces_; | 37 return previous_contained_surfaces_; |
37 } | 38 } |
38 | 39 |
39 private: | 40 private: |
40 RenderPassId RemapPassId(RenderPassId surface_local_pass_id, | 41 RenderPassId RemapPassId(RenderPassId surface_local_pass_id, |
41 SurfaceId surface_id); | 42 SurfaceId surface_id); |
42 | 43 |
43 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, | 44 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, |
44 float opacity, | 45 float opacity, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 98 |
98 // Resource list for the aggregated frame. | 99 // Resource list for the aggregated frame. |
99 TransferableResourceArray* dest_resource_list_; | 100 TransferableResourceArray* dest_resource_list_; |
100 | 101 |
101 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); | 102 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); |
102 }; | 103 }; |
103 | 104 |
104 } // namespace cc | 105 } // namespace cc |
105 | 106 |
106 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ | 107 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ |
OLD | NEW |