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

Side by Side Diff: ui/compositor/compositor_observer.h

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: create cc::LatencyInfo Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_
6 #define UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_
7 7
8 #include "ui/compositor/compositor_export.h" 8 #include "ui/compositor/compositor_export.h"
9 9
10 namespace cc {
11 struct LatencyInfo;
12 }
13
10 namespace ui { 14 namespace ui {
11 15
12 class Compositor; 16 class Compositor;
13 17
14 // A compositor observer is notified when compositing completes. 18 // A compositor observer is notified when compositing completes.
15 class COMPOSITOR_EXPORT CompositorObserver { 19 class COMPOSITOR_EXPORT CompositorObserver {
16 public: 20 public:
17 // A commit proxies information from the main thread to the compositor 21 // A commit proxies information from the main thread to the compositor
18 // thread. It typically happens when some state changes that will require a 22 // thread. It typically happens when some state changes that will require a
19 // composite. In the multi-threaded case, many commits may happen between 23 // composite. In the multi-threaded case, many commits may happen between
20 // two successive composites. In the single-threaded, a single commit 24 // two successive composites. In the single-threaded, a single commit
21 // between two composites (just before the composite as part of the 25 // between two composites (just before the composite as part of the
22 // composite cycle). If the compositor is locked, it will not send this 26 // composite cycle). If the compositor is locked, it will not send this
23 // this signal. 27 // this signal.
24 virtual void OnCompositingDidCommit(Compositor* compositor) = 0; 28 virtual void OnCompositingDidCommit(Compositor* compositor) = 0;
25 29
26 // Called when compositing started: it has taken all the layer changes into 30 // Called when compositing started: it has taken all the layer changes into
27 // account and has issued the graphics commands. 31 // account and has issued the graphics commands.
28 virtual void OnCompositingStarted(Compositor* compositor) = 0; 32 virtual void OnCompositingStarted(Compositor* compositor) = 0;
29 33
30 // Called when compositing completes: the present to screen has completed. 34 // Called when compositing completes: the present to screen has completed.
31 virtual void OnCompositingEnded(Compositor* compositor) = 0; 35 virtual void OnCompositingEnded(Compositor* compositor) = 0;
32 36
33 // Called when compositing is aborted (e.g. lost graphics context). 37 // Called when compositing is aborted (e.g. lost graphics context).
34 virtual void OnCompositingAborted(Compositor* compositor) = 0; 38 virtual void OnCompositingAborted(Compositor* compositor) = 0;
35 39
36 // Called when the compositor lock state changes. 40 // Called when the compositor lock state changes.
37 virtual void OnCompositingLockStateChanged(Compositor* compositor) = 0; 41 virtual void OnCompositingLockStateChanged(Compositor* compositor) = 0;
38 42
43 // Called when a frame has been displayed and latency info for it was
44 // received.
45 virtual void OnReceivedLatencyInfo(Compositor* compositor,
46 const cc::LatencyInfo& latency_info) = 0;
47
39 protected: 48 protected:
40 virtual ~CompositorObserver() {} 49 virtual ~CompositorObserver() {}
41 }; 50 };
42 51
43 } // namespace ui 52 } // namespace ui
44 53
45 #endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ 54 #endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698