| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 float min_page_scale_factor, | 106 float min_page_scale_factor, |
| 107 float max_page_scale_factor) override; | 107 float max_page_scale_factor) override; |
| 108 bool IsExternalFlingActive() const override; | 108 bool IsExternalFlingActive() const override; |
| 109 void DidOverscroll(gfx::Vector2dF accumulated_overscroll, | 109 void DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
| 110 gfx::Vector2dF latest_overscroll_delta, | 110 gfx::Vector2dF latest_overscroll_delta, |
| 111 gfx::Vector2dF current_fling_velocity) override; | 111 gfx::Vector2dF current_fling_velocity) override; |
| 112 | 112 |
| 113 void UpdateParentDrawConstraints(); | 113 void UpdateParentDrawConstraints(); |
| 114 void DetachFunctorFromView(); | 114 void DetachFunctorFromView(); |
| 115 | 115 |
| 116 // Visible for testing. |
| 117 const gfx::Rect& global_visible_rect_for_testing() { |
| 118 return last_on_draw_global_visible_rect_; |
| 119 } |
| 120 |
| 116 private: | 121 private: |
| 117 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); | 122 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); |
| 118 bool CanOnDraw(); | 123 bool CanOnDraw(); |
| 119 // Checks the continuous invalidate and block invalidate state, and schedule | 124 // Checks the continuous invalidate and block invalidate state, and schedule |
| 120 // invalidates appropriately. If |force_invalidate| is true, then send a view | 125 // invalidates appropriately. If |force_invalidate| is true, then send a view |
| 121 // invalidate regardless of compositor expectation. | 126 // invalidate regardless of compositor expectation. |
| 122 void EnsureContinuousInvalidation(bool force_invalidate); | 127 void EnsureContinuousInvalidation(bool force_invalidate); |
| 123 bool CompositeSW(SkCanvas* canvas); | 128 bool CompositeSW(SkCanvas* canvas); |
| 124 void DidComposite(); | 129 void DidComposite(); |
| 125 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 130 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // visible skew (especially noticeable when scrolling up and down in the same | 200 // visible skew (especially noticeable when scrolling up and down in the same |
| 196 // spot over a period of time). | 201 // spot over a period of time). |
| 197 gfx::Vector2dF overscroll_rounding_error_; | 202 gfx::Vector2dF overscroll_rounding_error_; |
| 198 | 203 |
| 199 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 204 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
| 200 }; | 205 }; |
| 201 | 206 |
| 202 } // namespace android_webview | 207 } // namespace android_webview |
| 203 | 208 |
| 204 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 209 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| OLD | NEW |