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/animation/layer_tree_mutations.h" |
11 #include "cc/debug/frame_timing_tracker.h" | 12 #include "cc/debug/frame_timing_tracker.h" |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class Vector2d; | 15 class Vector2d; |
15 class Vector2dF; | 16 class Vector2dF; |
16 } | 17 } |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
19 class ContextProvider; | 20 class ContextProvider; |
20 class InputHandlerClient; | 21 class InputHandlerClient; |
(...skipping 19 matching lines...) Expand all Loading... |
40 // state. (The "compositing state" will result in a mutated layer tree on the | 41 // state. (The "compositing state" will result in a mutated layer tree on the |
41 // LayerTreeHost via additional interface indirections which lead back to | 42 // LayerTreeHost via additional interface indirections which lead back to |
42 // mutations on the LayerTreeHost.) | 43 // mutations on the LayerTreeHost.) |
43 virtual void UpdateLayerTreeHost() = 0; | 44 virtual void UpdateLayerTreeHost() = 0; |
44 virtual void ApplyViewportDeltas( | 45 virtual void ApplyViewportDeltas( |
45 const gfx::Vector2dF& inner_delta, | 46 const gfx::Vector2dF& inner_delta, |
46 const gfx::Vector2dF& outer_delta, | 47 const gfx::Vector2dF& outer_delta, |
47 const gfx::Vector2dF& elastic_overscroll_delta, | 48 const gfx::Vector2dF& elastic_overscroll_delta, |
48 float page_scale, | 49 float page_scale, |
49 float top_controls_delta) = 0; | 50 float top_controls_delta) = 0; |
| 51 virtual void ApplyMutations(const LayerTreeMutations& mutations) = 0; |
50 // Request an OutputSurface from the client. When the client has one it should | 52 // Request an OutputSurface from the client. When the client has one it should |
51 // call LayerTreeHost::SetOutputSurface. This will result in either | 53 // call LayerTreeHost::SetOutputSurface. This will result in either |
52 // DidFailToInitializeOutputSurface or DidInitializeOutputSurface being | 54 // DidFailToInitializeOutputSurface or DidInitializeOutputSurface being |
53 // called. | 55 // called. |
54 virtual void RequestNewOutputSurface() = 0; | 56 virtual void RequestNewOutputSurface() = 0; |
55 virtual void DidInitializeOutputSurface() = 0; | 57 virtual void DidInitializeOutputSurface() = 0; |
56 virtual void DidFailToInitializeOutputSurface() = 0; | 58 virtual void DidFailToInitializeOutputSurface() = 0; |
57 virtual void WillCommit() = 0; | 59 virtual void WillCommit() = 0; |
58 virtual void DidCommit() = 0; | 60 virtual void DidCommit() = 0; |
59 virtual void DidCommitAndDrawFrame() = 0; | 61 virtual void DidCommitAndDrawFrame() = 0; |
60 virtual void DidCompleteSwapBuffers() = 0; | 62 virtual void DidCompleteSwapBuffers() = 0; |
61 virtual void RecordFrameTimingEvents( | 63 virtual void RecordFrameTimingEvents( |
62 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 64 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
63 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0; | 65 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0; |
64 | 66 |
65 // Called when page scale animation has completed. | 67 // Called when page scale animation has completed. |
66 virtual void DidCompletePageScaleAnimation() = 0; | 68 virtual void DidCompletePageScaleAnimation() = 0; |
67 | 69 |
68 // TODO(simonhong): Makes this to pure virtual function when client | 70 // TODO(simonhong): Makes this to pure virtual function when client |
69 // implementation is ready. | 71 // implementation is ready. |
70 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} | 72 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} |
71 | 73 |
72 protected: | 74 protected: |
73 virtual ~LayerTreeHostClient() {} | 75 virtual ~LayerTreeHostClient() {} |
74 }; | 76 }; |
75 | 77 |
76 } // namespace cc | 78 } // namespace cc |
77 | 79 |
78 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ | 80 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
OLD | NEW |