| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 class CC_SURFACES_EXPORT SurfaceAggregator { | 30 class CC_SURFACES_EXPORT SurfaceAggregator { |
| 31 public: | 31 public: |
| 32 using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>; | 32 using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>; |
| 33 | 33 |
| 34 SurfaceAggregator(SurfaceManager* manager, | 34 SurfaceAggregator(SurfaceManager* manager, |
| 35 ResourceProvider* provider, | 35 ResourceProvider* provider, |
| 36 bool aggregate_only_damaged); | 36 bool aggregate_only_damaged); |
| 37 ~SurfaceAggregator(); | 37 ~SurfaceAggregator(); |
| 38 | 38 |
| 39 CompositorFrame Aggregate(SurfaceId surface_id); | 39 std::unique_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); |
| 40 void ReleaseResources(SurfaceId surface_id); | 40 void ReleaseResources(SurfaceId surface_id); |
| 41 SurfaceIndexMap& previous_contained_surfaces() { | 41 SurfaceIndexMap& previous_contained_surfaces() { |
| 42 return previous_contained_surfaces_; | 42 return previous_contained_surfaces_; |
| 43 } | 43 } |
| 44 void SetFullDamageForSurface(SurfaceId surface_id); | 44 void SetFullDamageForSurface(SurfaceId surface_id); |
| 45 void set_output_is_secure(bool secure) { output_is_secure_ = secure; } | 45 void set_output_is_secure(bool secure) { output_is_secure_ = secure; } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 struct ClipData { | 48 struct ClipData { |
| 49 ClipData() : is_clipped(false) {} | 49 ClipData() : is_clipped(false) {} |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 TransferableResourceArray* dest_resource_list_; | 168 TransferableResourceArray* dest_resource_list_; |
| 169 | 169 |
| 170 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; | 170 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; |
| 171 | 171 |
| 172 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); | 172 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace cc | 175 } // namespace cc |
| 176 | 176 |
| 177 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ | 177 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ |
| OLD | NEW |