diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-16 06:07:45 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-16 06:09:03 +0000 |
commit | c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb (patch) | |
tree | 8b47c23a049f5e6d9e00e7f970637e0acc7fd908 /cc/surfaces/display.h | |
parent | e510e37dda59f01b402489d2b8fdc9b2f05d4f0c (diff) | |
download | chromium_src-c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb.zip chromium_src-c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb.tar.gz chromium_src-c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb.tar.bz2 |
Enqueuing new frames in a Surface should cause Displays to reaggregate it
Keep track of which Surfaces were included in a Display last
frame, so if a new frame is enqueued in a Surface the Displays containing it will tell their clients to redraw. This way the browser compositor
doesn't have to commit if only the renderer contents changed.
BUG=
Review URL: https://codereview.chromium.org/432093003
Cr-Commit-Position: refs/heads/master@{#290103}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/surfaces/display.h')
-rw-r--r-- | cc/surfaces/display.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h index 93606ba..8af18b57 100644 --- a/cc/surfaces/display.h +++ b/cc/surfaces/display.h @@ -11,6 +11,7 @@ #include "cc/resources/returned_resource.h" #include "cc/surfaces/surface_aggregator.h" #include "cc/surfaces/surface_id.h" +#include "cc/surfaces/surface_manager.h" #include "cc/surfaces/surfaces_export.h" namespace gfx { @@ -28,13 +29,13 @@ class Surface; class SurfaceAggregator; class SurfaceIdAllocator; class SurfaceFactory; -class SurfaceManager; // A Display produces a surface that can be used to draw to a physical display // (OutputSurface). The client is responsible for creating and sizing the // surface IDs used to draw into the display and deciding when to draw. class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, - public RendererClient { + public RendererClient, + public SurfaceDamageObserver { public: Display(DisplayClient* client, SurfaceManager* manager, @@ -72,6 +73,9 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, virtual void SetFullRootLayerDamage() OVERRIDE {} virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {} + // SurfaceDamageObserver implementation. + virtual void OnSurfaceDamaged(SurfaceId surface) OVERRIDE; + private: void InitializeOutputSurface(); @@ -86,6 +90,8 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, scoped_ptr<SurfaceAggregator> aggregator_; scoped_ptr<DirectRenderer> renderer_; + std::set<SurfaceId> contained_surfaces_; + DISALLOW_COPY_AND_ASSIGN(Display); }; |