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

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 506273002: Aggregate damage rects in surface aggregator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 65174b531d89c0481b75b6eac2ecb569e14df1e9..5e91c870645e722e66b4de4153f43dd4baf57e3e 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -26,12 +26,15 @@ class SurfaceManager;
class CC_SURFACES_EXPORT SurfaceAggregator {
public:
+ typedef base::hash_map<SurfaceId, int> SurfaceIndexMap;
+
SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider);
~SurfaceAggregator();
- scoped_ptr<CompositorFrame> Aggregate(
- SurfaceId surface_id,
- std::set<SurfaceId>* contained_surfaces);
+ scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id);
+ SurfaceIndexMap& previous_contained_surfaces() {
+ return previous_contained_surfaces_;
+ }
private:
RenderPassId RemapPassId(RenderPassId surface_local_pass_id,
@@ -47,12 +50,15 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
const gfx::Transform& content_to_target_transform,
RenderPass* dest_pass,
SurfaceId surface_id);
- void CopyPasses(const RenderPassList& source_pass_list, SurfaceId surface_id);
+ void CopyPasses(const RenderPassList& source_pass_list,
+ const Surface* surface);
bool TakeResources(Surface* surface,
const DelegatedFrameData* frame_data,
RenderPassList* render_pass_list);
int ChildIdForSurface(Surface* surface);
+ gfx::Rect DamageRectForSurface(const Surface* surface,
+ const RenderPass& source);
SurfaceManager* manager_;
ResourceProvider* provider_;
@@ -74,8 +80,10 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
typedef std::set<SurfaceId> SurfaceSet;
SurfaceSet referenced_surfaces_;
- // This is the set of surfaces that were used in the last draw.
- SurfaceSet* contained_surfaces_;
+ // For each Surface used in the last aggregation, gives the frame_index at
+ // that time.
+ SurfaceIndexMap previous_contained_surfaces_;
+ SurfaceIndexMap contained_surfaces_;
// This is the pass list for the aggregated frame.
RenderPassList* dest_pass_list_;
« 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