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

Unified Diff: cc/surfaces/surface_factory.cc

Issue 2785103003: [cc] CompositorFrameSinkSupport: Defer BeginFrameAck of pending frames. (Closed)
Patch Set: add comment Created 3 years, 9 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/direct_compositor_frame_sink_unittest.cc ('k') | cc/surfaces/surface_factory_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory.cc
diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
index 880cb8c828a675fe85cd426bfb9caa05355e6cbc..0924899559cd497b1263bc3e2152dee5670296ac 100644
--- a/cc/surfaces/surface_factory.cc
+++ b/cc/surfaces/surface_factory.cc
@@ -116,6 +116,9 @@ void SurfaceFactory::OnReferencedSurfacesChanged(
void SurfaceFactory::OnSurfaceActivated(Surface* surface) {
DCHECK(surface->HasActiveFrame());
+
+ client_->PendingFrameActivated(surface->surface_id().local_surface_id());
+
if (seen_first_frame_activation_)
return;
@@ -138,7 +141,9 @@ void SurfaceFactory::OnSurfaceDependenciesChanged(
const SurfaceDependencies& added_dependencies,
const SurfaceDependencies& removed_dependencies) {}
-void SurfaceFactory::OnSurfaceDiscarded(Surface* surface) {}
+void SurfaceFactory::OnSurfaceDiscarded(Surface* surface) {
+ client_->SurfaceDiscarded(surface->surface_id().local_surface_id());
+}
std::unique_ptr<Surface> SurfaceFactory::Create(
const LocalSurfaceId& local_surface_id) {
@@ -150,8 +155,10 @@ std::unique_ptr<Surface> SurfaceFactory::Create(
}
void SurfaceFactory::Destroy(std::unique_ptr<Surface> surface) {
+ LocalSurfaceId surface_id = surface->surface_id().local_surface_id();
surface->RemoveObserver(this);
manager_->DestroySurface(std::move(surface));
+ client_->SurfaceDiscarded(surface_id);
}
} // namespace cc
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink_unittest.cc ('k') | cc/surfaces/surface_factory_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698