| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 private: | 126 private: |
| 127 void SetTotalRootLayerScrollOffset(const gfx::Vector2dF& new_value_dip); | 127 void SetTotalRootLayerScrollOffset(const gfx::Vector2dF& new_value_dip); |
| 128 bool CanOnDraw(); | 128 bool CanOnDraw(); |
| 129 // Posts an invalidate with fallback tick. All invalidates posted while an | 129 // Posts an invalidate with fallback tick. All invalidates posted while an |
| 130 // invalidate is pending will be posted as a single invalidate after the | 130 // invalidate is pending will be posted as a single invalidate after the |
| 131 // pending invalidate is done. | 131 // pending invalidate is done. |
| 132 void PostInvalidateWithFallback(); | 132 void PostInvalidateWithFallback(); |
| 133 void CancelFallbackTick(); | 133 void CancelFallbackTick(); |
| 134 void UpdateCompositorIsActive(); | 134 void UpdateCompositorIsActive(); |
| 135 bool CompositeSW(SkCanvas* canvas); | 135 bool CompositeSW(SkCanvas* canvas); |
| 136 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 136 scoped_ptr<base::trace_event::ConvertableToTraceFormat> RootLayerStateAsValue( |
| 137 RootLayerStateAsValue(const gfx::Vector2dF& total_scroll_offset_dip, | 137 const gfx::Vector2dF& total_scroll_offset_dip, |
| 138 const gfx::SizeF& scrollable_size_dip); | 138 const gfx::SizeF& scrollable_size_dip); |
| 139 | 139 |
| 140 bool CompositeHw(); | 140 bool CompositeHw(); |
| 141 void ReturnUnusedResource(scoped_ptr<ChildFrame> frame); | 141 void ReturnUnusedResource(scoped_ptr<ChildFrame> frame); |
| 142 void ReturnResourceFromParent(); | 142 void ReturnResourceFromParent(); |
| 143 | 143 |
| 144 // If we call up view invalidate and OnDraw is not called before a deadline, | 144 // If we call up view invalidate and OnDraw is not called before a deadline, |
| 145 // then we keep ticking the SynchronousCompositor so it can make progress. | 145 // then we keep ticking the SynchronousCompositor so it can make progress. |
| 146 // Do this in a two stage tick due to native MessageLoop favors delayed task, | 146 // Do this in a two stage tick due to native MessageLoop favors delayed task, |
| 147 // so ensure delayed task is inserted only after the draw task returns. | 147 // so ensure delayed task is inserted only after the draw task returns. |
| 148 void PostFallbackTick(); | 148 void PostFallbackTick(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 gfx::Vector2dF overscroll_rounding_error_; | 214 gfx::Vector2dF overscroll_rounding_error_; |
| 215 | 215 |
| 216 unsigned int next_compositor_id_; | 216 unsigned int next_compositor_id_; |
| 217 | 217 |
| 218 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 218 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 } // namespace android_webview | 221 } // namespace android_webview |
| 222 | 222 |
| 223 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 223 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| OLD | NEW |