Chromium Code Reviews| Index: cc/surfaces/surface_aggregator.h |
| diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h |
| index 1ff4a45804b1c69be5b43a151d2f664377592771..738aeec2a0bc003aa6ed5859f440cdc2049a0e25 100644 |
| --- a/cc/surfaces/surface_aggregator.h |
| +++ b/cc/surfaces/surface_aggregator.h |
| @@ -25,11 +25,20 @@ class Surface; |
| class SurfaceDrawQuad; |
| class SurfaceManager; |
| +class CC_SURFACES_EXPORT SurfaceAggregatorClient { |
| + public: |
| + virtual ~SurfaceAggregatorClient() {} |
| + |
| + virtual void AddSurface(Surface* surface) = 0; |
| + virtual void RemoveSurface(Surface* surface) = 0; |
| +}; |
| + |
| class CC_SURFACES_EXPORT SurfaceAggregator { |
| public: |
| typedef base::hash_map<SurfaceId, int> SurfaceIndexMap; |
| - SurfaceAggregator(SurfaceManager* manager, |
| + SurfaceAggregator(SurfaceAggregatorClient* client, |
|
mithro-old
2015/10/01 03:00:23
I *think* it makes sense that a SurfaceAggregator
brianderson
2015/10/07 20:54:48
It is owned by the Display (which is the SurfaceAg
|
| + SurfaceManager* manager, |
| ResourceProvider* provider, |
| bool aggregate_only_damaged); |
| ~SurfaceAggregator(); |
| @@ -79,13 +88,16 @@ class CC_SURFACES_EXPORT SurfaceAggregator { |
| // Remove Surfaces that were referenced before but aren't currently |
| // referenced from the ResourceProvider. |
| - void RemoveUnreferencedChildren(); |
| + // Also notifies SurfaceAggregatorClient of newly added and removed |
| + // child surfaces. |
| + void ProcessAddedAndRemovedSurfaces(); |
| int ChildIdForSurface(Surface* surface); |
| gfx::Rect DamageRectForSurface(const Surface* surface, |
| const RenderPass& source, |
| - const gfx::Rect& full_rect); |
| + const gfx::Rect& full_rect) const; |
| + SurfaceAggregatorClient* client_; // Outlives this class. |
| SurfaceManager* manager_; |
| ResourceProvider* provider_; |