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 <memory> | 10 #include <memory> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Should be called by the embedder after the embedder had modified the | 83 // Should be called by the embedder after the embedder had modified the |
84 // scroll offset of the root layer. | 84 // scroll offset of the root layer. |
85 virtual void DidChangeRootLayerScrollOffset( | 85 virtual void DidChangeRootLayerScrollOffset( |
86 const gfx::ScrollOffset& root_offset) = 0; | 86 const gfx::ScrollOffset& root_offset) = 0; |
87 | 87 |
88 // Allows embedder to synchronously update the zoom level, ie page scale | 88 // Allows embedder to synchronously update the zoom level, ie page scale |
89 // factor, around the anchor point. | 89 // factor, around the anchor point. |
90 virtual void SynchronouslyZoomBy(float zoom_delta, | 90 virtual void SynchronouslyZoomBy(float zoom_delta, |
91 const gfx::Point& anchor) = 0; | 91 const gfx::Point& anchor) = 0; |
92 | 92 |
93 // Called by the embedder to notify that the compositor is active. The | |
94 // compositor won't ask for vsyncs when it's inactive. NOTE: The compositor | |
95 // starts off as inactive and needs a SetActive(true) call to begin. | |
96 virtual void SetIsActive(bool is_active) = 0; | |
97 | |
98 // Called by the embedder to notify that the OnComputeScroll step is happening | 93 // Called by the embedder to notify that the OnComputeScroll step is happening |
99 // and if any input animation is active, it should tick now. | 94 // and if any input animation is active, it should tick now. |
100 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; | 95 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; |
101 | 96 |
102 protected: | 97 protected: |
103 virtual ~SynchronousCompositor() {} | 98 virtual ~SynchronousCompositor() {} |
104 }; | 99 }; |
105 | 100 |
106 } // namespace content | 101 } // namespace content |
107 | 102 |
108 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 103 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
OLD | NEW |