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

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 1172883004: Don't aggregate quads outside of damage rect when using partial swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@predamage
Patch Set: Created 5 years, 5 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/display.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 17ea4c4312560ae9b5b96b83d478f07357658a51..1ff4a45804b1c69be5b43a151d2f664377592771 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -29,7 +29,9 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
public:
typedef base::hash_map<SurfaceId, int> SurfaceIndexMap;
- SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider);
+ SurfaceAggregator(SurfaceManager* manager,
+ ResourceProvider* provider,
+ bool aggregate_only_damaged);
~SurfaceAggregator();
scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id);
@@ -60,10 +62,10 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
const gfx::Transform& target_transform,
const ClipData& clip_rect,
RenderPass* dest_pass);
- void CopySharedQuadState(const SharedQuadState* source_sqs,
- const gfx::Transform& target_transform,
- const ClipData& clip_rect,
- RenderPass* dest_render_pass);
+ SharedQuadState* CopySharedQuadState(const SharedQuadState* source_sqs,
+ const gfx::Transform& target_transform,
+ const ClipData& clip_rect,
+ RenderPass* dest_render_pass);
void CopyQuadsToPass(
const QuadList& source_quad_list,
const SharedQuadStateList& source_shared_quad_state_list,
@@ -72,7 +74,7 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
const ClipData& clip_rect,
RenderPass* dest_pass,
SurfaceId surface_id);
- gfx::Rect ValidateAndCalculateDamageRect(SurfaceId surface_id);
+ gfx::Rect PrewalkTree(SurfaceId surface_id);
void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface);
// Remove Surfaces that were referenced before but aren't currently
@@ -92,6 +94,7 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
RenderPassIdAllocatorMap;
RenderPassIdAllocatorMap render_pass_allocator_map_;
int next_render_pass_id_;
+ const bool aggregate_only_damaged_;
typedef base::hash_map<SurfaceId, int> SurfaceToResourceChildIdMap;
SurfaceToResourceChildIdMap surface_id_to_resource_child_id_;
@@ -116,6 +119,13 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
// This is the pass list for the aggregated frame.
RenderPassList* dest_pass_list_;
+ // The root damage rect of the currently-aggregating frame.
+ gfx::Rect root_damage_rect_;
+
+ // True if the frame that's currently being aggregated has copy requests.
+ // This is valid during Aggregate after PrewalkTree is called.
+ bool has_copy_requests_;
+
// Resource list for the aggregated frame.
TransferableResourceArray* dest_resource_list_;
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698