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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 2834553002: Replace CompositorFrameSinkSupport::WillDrawSurface With RepeatingCallback (Closed)
Patch Set: Address Comments On Documentation Created 3 years, 8 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_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 526b19324e9c76284fa9fee72ff76dfed6956690..898328c4a71ec9fa1f63ad44c9338bc6abad5f3e 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -26,7 +26,6 @@
#include "cc/quads/texture_draw_quad.h"
#include "cc/resources/resource_provider.h"
#include "cc/surfaces/surface.h"
-#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
#include "cc/trees/blocking_task_runner.h"
@@ -577,7 +576,7 @@ void SurfaceAggregator::ProcessAddedAndRemovedSurfaces() {
// Notify client of removed surface.
Surface* surface_ptr = manager_->GetSurfaceForId(surface.first);
if (surface_ptr) {
- surface_ptr->RunDrawCallbacks();
+ surface_ptr->RunDrawCallback();
}
}
}
@@ -759,10 +758,10 @@ gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id,
}
CHECK(debug_weak_this.get());
- if (surface->factory()) {
- surface->factory()->WillDrawSurface(
- surface->surface_id().local_surface_id(), damage_rect);
- }
+ // TODO(staraz): It shouldn't need to call the callback when the damage is
+ // from |surface| and not from |child_surfaces|.
+ if (!damage_rect.IsEmpty())
+ surface->RunWillDrawCallback(damage_rect);
CHECK(debug_weak_this.get());
for (const auto& render_pass : frame.render_pass_list) {
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_aggregator_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698