OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_TREES_LAYER_TREE_HOST_CLIENT_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "cc/debug/frame_timing_tracker.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 class Vector2d; | 14 class Vector2d; |
14 class Vector2dF; | 15 class Vector2dF; |
15 } | 16 } |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 class ContextProvider; | 19 class ContextProvider; |
19 class InputHandlerClient; | 20 class InputHandlerClient; |
20 class OutputSurface; | 21 class OutputSurface; |
(...skipping 21 matching lines...) Expand all Loading... |
42 // call LayerTreeHost::SetOutputSurface. This will result in either | 43 // call LayerTreeHost::SetOutputSurface. This will result in either |
43 // DidFailToInitializeOutputSurface or DidInitializeOutputSurface being | 44 // DidFailToInitializeOutputSurface or DidInitializeOutputSurface being |
44 // called. | 45 // called. |
45 virtual void RequestNewOutputSurface() = 0; | 46 virtual void RequestNewOutputSurface() = 0; |
46 virtual void DidInitializeOutputSurface() = 0; | 47 virtual void DidInitializeOutputSurface() = 0; |
47 virtual void DidFailToInitializeOutputSurface() = 0; | 48 virtual void DidFailToInitializeOutputSurface() = 0; |
48 virtual void WillCommit() = 0; | 49 virtual void WillCommit() = 0; |
49 virtual void DidCommit() = 0; | 50 virtual void DidCommit() = 0; |
50 virtual void DidCommitAndDrawFrame() = 0; | 51 virtual void DidCommitAndDrawFrame() = 0; |
51 virtual void DidCompleteSwapBuffers() = 0; | 52 virtual void DidCompleteSwapBuffers() = 0; |
| 53 virtual void RecordFrameTimingEvents( |
| 54 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 55 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0; |
52 | 56 |
53 // Called when page scale animation has completed. | 57 // Called when page scale animation has completed. |
54 virtual void DidCompletePageScaleAnimation() = 0; | 58 virtual void DidCompletePageScaleAnimation() = 0; |
55 | 59 |
56 // TODO(simonhong): Makes this to pure virtual function when client | 60 // TODO(simonhong): Makes this to pure virtual function when client |
57 // implementation is ready. | 61 // implementation is ready. |
58 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} | 62 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} |
59 | 63 |
60 // Requests that the client insert a rate limiting token in the shared main | 64 // Requests that the client insert a rate limiting token in the shared main |
61 // thread context's command stream that will block if the context gets too far | 65 // thread context's command stream that will block if the context gets too far |
62 // ahead of the compositor's command stream. Only needed if the tree contains | 66 // ahead of the compositor's command stream. Only needed if the tree contains |
63 // a TextureLayer that calls SetRateLimitContext(true). | 67 // a TextureLayer that calls SetRateLimitContext(true). |
64 virtual void RateLimitSharedMainThreadContext() {} | 68 virtual void RateLimitSharedMainThreadContext() {} |
65 | 69 |
66 protected: | 70 protected: |
67 virtual ~LayerTreeHostClient() {} | 71 virtual ~LayerTreeHostClient() {} |
68 }; | 72 }; |
69 | 73 |
70 } // namespace cc | 74 } // namespace cc |
71 | 75 |
72 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ | 76 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
OLD | NEW |