OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
7 | 7 |
8 #include "android_webview/browser/parent_compositor_draw_constraints.h" | 8 #include "android_webview/browser/parent_compositor_draw_constraints.h" |
9 #include "android_webview/browser/shared_renderer_state.h" | 9 #include "android_webview/browser/shared_renderer_state.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, | 98 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
99 gfx::Vector2dF latest_overscroll_delta, | 99 gfx::Vector2dF latest_overscroll_delta, |
100 gfx::Vector2dF current_fling_velocity) override; | 100 gfx::Vector2dF current_fling_velocity) override; |
101 | 101 |
102 void UpdateParentDrawConstraints(); | 102 void UpdateParentDrawConstraints(); |
103 void DidSkipCommitFrame(); | 103 void DidSkipCommitFrame(); |
104 void InvalidateOnFunctorDestroy(); | 104 void InvalidateOnFunctorDestroy(); |
105 | 105 |
106 private: | 106 private: |
107 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); | 107 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); |
| 108 bool CanOnDraw(); |
108 // Checks the continuous invalidate and block invalidate state, and schedule | 109 // Checks the continuous invalidate and block invalidate state, and schedule |
109 // invalidates appropriately. If |force_invalidate| is true, then send a view | 110 // invalidates appropriately. If |force_invalidate| is true, then send a view |
110 // invalidate regardless of compositor expectation. If |skip_reschedule_tick| | 111 // invalidate regardless of compositor expectation. If |skip_reschedule_tick| |
111 // is true and if there is already a pending fallback tick, don't reschedule | 112 // is true and if there is already a pending fallback tick, don't reschedule |
112 // them. | 113 // them. |
113 void EnsureContinuousInvalidation(bool force_invalidate, | 114 void EnsureContinuousInvalidation(bool force_invalidate, |
114 bool skip_reschedule_tick); | 115 bool skip_reschedule_tick); |
115 bool CompositeSW(SkCanvas* canvas); | 116 bool CompositeSW(SkCanvas* canvas); |
116 void DidComposite(); | 117 void DidComposite(); |
117 void DidSkipCompositeInDraw(); | 118 void DidSkipCompositeInDraw(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // visible skew (especially noticeable when scrolling up and down in the same | 193 // visible skew (especially noticeable when scrolling up and down in the same |
193 // spot over a period of time). | 194 // spot over a period of time). |
194 gfx::Vector2dF overscroll_rounding_error_; | 195 gfx::Vector2dF overscroll_rounding_error_; |
195 | 196 |
196 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 197 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
197 }; | 198 }; |
198 | 199 |
199 } // namespace android_webview | 200 } // namespace android_webview |
200 | 201 |
201 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 202 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
OLD | NEW |