| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Checks the continuous invalidate and block invalidate state, and schedule | 108 // Checks the continuous invalidate and block invalidate state, and schedule |
| 109 // invalidates appropriately. If |force_invalidate| is true, then send a view | 109 // invalidates appropriately. If |force_invalidate| is true, then send a view |
| 110 // invalidate regardless of compositor expectation. If |skip_reschedule_tick| | 110 // invalidate regardless of compositor expectation. If |skip_reschedule_tick| |
| 111 // is true and if there is already a pending fallback tick, don't reschedule | 111 // is true and if there is already a pending fallback tick, don't reschedule |
| 112 // them. | 112 // them. |
| 113 void EnsureContinuousInvalidation(bool force_invalidate, | 113 void EnsureContinuousInvalidation(bool force_invalidate, |
| 114 bool skip_reschedule_tick); | 114 bool skip_reschedule_tick); |
| 115 bool CompositeSW(SkCanvas* canvas); | 115 bool CompositeSW(SkCanvas* canvas); |
| 116 void DidComposite(); | 116 void DidComposite(); |
| 117 void DidSkipCompositeInDraw(); | 117 void DidSkipCompositeInDraw(); |
| 118 scoped_refptr<base::debug::ConvertableToTraceFormat> RootLayerStateAsValue( | 118 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
| 119 const gfx::Vector2dF& total_scroll_offset_dip, | 119 RootLayerStateAsValue(const gfx::Vector2dF& total_scroll_offset_dip, |
| 120 const gfx::SizeF& scrollable_size_dip); | 120 const gfx::SizeF& scrollable_size_dip); |
| 121 | 121 |
| 122 scoped_ptr<cc::CompositorFrame> CompositeHw(); | 122 scoped_ptr<cc::CompositorFrame> CompositeHw(); |
| 123 void ReturnUnusedResource(scoped_ptr<cc::CompositorFrame> frame); | 123 void ReturnUnusedResource(scoped_ptr<cc::CompositorFrame> frame); |
| 124 void ReturnResourceFromParent(); | 124 void ReturnResourceFromParent(); |
| 125 | 125 |
| 126 // If we call up view invalidate and OnDraw is not called before a deadline, | 126 // If we call up view invalidate and OnDraw is not called before a deadline, |
| 127 // then we keep ticking the SynchronousCompositor so it can make progress. | 127 // then we keep ticking the SynchronousCompositor so it can make progress. |
| 128 // Do this in a two stage tick due to native MessageLoop favors delayed task, | 128 // Do this in a two stage tick due to native MessageLoop favors delayed task, |
| 129 // so ensure delayed task is inserted only after the draw task returns. | 129 // so ensure delayed task is inserted only after the draw task returns. |
| 130 void PostFallbackTick(); | 130 void PostFallbackTick(); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // visible skew (especially noticeable when scrolling up and down in the same | 192 // visible skew (especially noticeable when scrolling up and down in the same |
| 193 // spot over a period of time). | 193 // spot over a period of time). |
| 194 gfx::Vector2dF overscroll_rounding_error_; | 194 gfx::Vector2dF overscroll_rounding_error_; |
| 195 | 195 |
| 196 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 196 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace android_webview | 199 } // namespace android_webview |
| 200 | 200 |
| 201 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 201 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| OLD | NEW |