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

Side by Side Diff: cc/surfaces/pending_frame_observer.h

Issue 2676373004: Implement service-side surface synchronization (Closed)
Patch Set: Better unit test name 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_SURFACES_PENDING_FRAME_OBSERVER_H_
6 #define CC_SURFACES_PENDING_FRAME_OBSERVER_H_
7
8 #include "base/containers/flat_set.h"
9 #include "cc/surfaces/surface_id.h"
10 #include "cc/surfaces/surfaces_export.h"
11
12 namespace cc {
13
14 using SurfaceDependencies = base::flat_set<SurfaceId>;
15
16 class Surface;
17
18 // Clients that wish to observe when the state of a pending CompostiorFrame
19 // changes should implement this class.
20 class CC_SURFACES_EXPORT PendingFrameObserver {
21 public:
22 // Called when a CompositorFrame within |surface| has activated.
23 virtual void OnSurfaceActivated(Surface* surface) = 0;
24
25 // Called when the dependencies of a pending CompositorFrame within |surface|
26 // have changed.
27 virtual void OnSurfaceDependenciesChanged(
28 Surface* surface,
29 const SurfaceDependencies& added_dependencies,
30 const SurfaceDependencies& removed_dependencies) = 0;
31
32 // Called when |surface| is being destroyed.
33 virtual void OnSurfaceDiscarded(Surface* surface) = 0;
34
35 protected:
36 virtual ~PendingFrameObserver() = default;
37 };
38
39 } // namespace cc
40
41 #endif // CC_SURFACES_PENDING_FRAME_OBSERVER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/local_surface_id.h ('k') | cc/surfaces/surface.h » ('j') | cc/surfaces/surface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698