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

Unified Diff: cc/surfaces/surface_manager.cc

Issue 2938833002: Add SurfaceWillDraw notification (Closed)
Patch Set: add unit test to verify that OnSurfaceWillDraw is called only for surfaces added to the CompositorF… Created 3 years, 6 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_manager.h ('k') | cc/surfaces/surface_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_manager.cc
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
index bd783705d0b6aed8301efae03420e61ab1fe913c..f51b71f91a30270ac1e19d6355438f796d80e647 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -127,6 +127,12 @@ void SurfaceManager::DestroySurface(std::unique_ptr<Surface> surface) {
GarbageCollectSurfaces();
}
+void SurfaceManager::SurfaceWillDraw(const SurfaceId& surface_id) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ for (auto& observer : observer_list_)
+ observer.OnSurfaceWillDraw(surface_id);
+}
+
void SurfaceManager::RequireSequence(const SurfaceId& surface_id,
const SurfaceSequence& sequence) {
auto* surface = GetSurfaceForId(surface_id);
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | cc/surfaces/surface_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698