Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix webview Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
+ 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_;
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698