OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Should be called by the embedder after the embedder had modified the | 87 // Should be called by the embedder after the embedder had modified the |
88 // scroll offset of the root layer. | 88 // scroll offset of the root layer. |
89 virtual void DidChangeRootLayerScrollOffset( | 89 virtual void DidChangeRootLayerScrollOffset( |
90 const gfx::ScrollOffset& root_offset) = 0; | 90 const gfx::ScrollOffset& root_offset) = 0; |
91 | 91 |
92 // Called by the embedder to notify that the compositor is active. The | 92 // Called by the embedder to notify that the compositor is active. The |
93 // compositor won't ask for vsyncs when it's inactive. NOTE: The compositor | 93 // compositor won't ask for vsyncs when it's inactive. NOTE: The compositor |
94 // starts off as inactive and needs a SetActive(true) call to begin. | 94 // starts off as inactive and needs a SetActive(true) call to begin. |
95 virtual void SetIsActive(bool is_active) = 0; | 95 virtual void SetIsActive(bool is_active) = 0; |
96 | 96 |
| 97 // Synchronize all renderer state to UI thread. This blocks the UI thread. |
| 98 virtual void SynchronizeWithRenderer() = 0; |
| 99 |
97 // Called by the embedder to notify that the OnComputeScroll step is happening | 100 // Called by the embedder to notify that the OnComputeScroll step is happening |
98 // and if any input animation is active, it should tick now. | 101 // and if any input animation is active, it should tick now. |
99 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; | 102 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; |
100 | 103 |
101 protected: | 104 protected: |
102 virtual ~SynchronousCompositor() {} | 105 virtual ~SynchronousCompositor() {} |
103 }; | 106 }; |
104 | 107 |
105 } // namespace content | 108 } // namespace content |
106 | 109 |
107 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 110 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
OLD | NEW |