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

Unified Diff: cc/surfaces/display.cc

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/display.h ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 4e01b7069dda977a5def78c8427da3a838cfb42b..70367e4bcfd625c4836bf6d4f87fb45fca3249b8 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -89,10 +89,8 @@ bool Display::Draw() {
if (!output_surface_)
return false;
- contained_surfaces_.clear();
-
scoped_ptr<CompositorFrame> frame =
- aggregator_->Aggregate(current_surface_id_, &contained_surfaces_);
+ aggregator_->Aggregate(current_surface_id_);
if (!frame)
return false;
@@ -116,10 +114,11 @@ bool Display::Draw() {
disable_picture_quad_image_filtering);
CompositorFrameMetadata metadata;
renderer_->SwapBuffers(metadata);
- for (std::set<SurfaceId>::iterator it = contained_surfaces_.begin();
- it != contained_surfaces_.end();
+ for (SurfaceAggregator::SurfaceIndexMap::iterator it =
+ aggregator_->previous_contained_surfaces().begin();
+ it != aggregator_->previous_contained_surfaces().end();
++it) {
- Surface* surface = manager_->GetSurfaceForId(*it);
+ Surface* surface = manager_->GetSurfaceForId(it->first);
if (surface)
surface->RunDrawCallbacks();
}
@@ -127,7 +126,7 @@ bool Display::Draw() {
}
void Display::OnSurfaceDamaged(SurfaceId surface) {
- if (contained_surfaces_.find(surface) != contained_surfaces_.end())
+ if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface))
client_->DisplayDamaged();
}
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698