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

Unified Diff: cc/surfaces/pending_frame_observer.h

Issue 2676373004: Implement service-side surface synchronization (Closed)
Patch Set: Use base::flat_set Created 3 years, 10 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
Index: cc/surfaces/pending_frame_observer.h
diff --git a/cc/surfaces/pending_frame_observer.h b/cc/surfaces/pending_frame_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..2641fe6099f67a74b6be1e0ccffab107280b5daf
--- /dev/null
+++ b/cc/surfaces/pending_frame_observer.h
@@ -0,0 +1,39 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_SURFACES_PENDING_FRAME_OBSERVER_H_
+#define CC_SURFACES_PENDING_FRAME_OBSERVER_H_
+
+#include "base/containers/flat_set.h"
+#include "cc/surfaces/surface_id.h"
+#include "cc/surfaces/surfaces_export.h"
+
+namespace cc {
+
+using SurfaceDependencies = base::flat_set<SurfaceId>;
+
+class Surface;
+
+class CC_SURFACES_EXPORT PendingFrameObserver {
rjkroege 2017/02/08 21:52:29 Add class comment
Fady Samuel 2017/02/08 23:39:57 Done.
+ public:
+ // Called when a CompositorFrame within |surface| has activated.
+ virtual void OnSurfaceActivated(Surface* surface) = 0;
+
+ // Called when the dependencies of a pending CompositorFrame within |surface|
+ // have changed.
+ virtual void OnSurfaceDependenciesChanged(
+ Surface* surface,
+ const SurfaceDependencies& added_dependencies,
+ const SurfaceDependencies& removed_dependencies) = 0;
+
+ // Called when |surface| is being destroyed.
+ virtual void OnSurfaceDiscarded(Surface* surface) = 0;
+
+ protected:
+ virtual ~PendingFrameObserver() {}
vmpstr 2017/02/08 19:25:39 = default?
Fady Samuel 2017/02/08 23:39:57 Done.
+};
+
+} // namespace cc
+
+#endif // CC_SURFACES_PENDING_FRAME_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698