| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "android_webview/browser/browser_view_renderer.h" | 5 #include "android_webview/browser/browser_view_renderer.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/browser_view_renderer_client.h" | 9 #include "android_webview/browser/browser_view_renderer_client.h" |
| 10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 gfx::Vector2d rounded_overscroll_delta = gfx::ToRoundedVector2d( | 693 gfx::Vector2d rounded_overscroll_delta = gfx::ToRoundedVector2d( |
| 694 scaled_overscroll_delta + overscroll_rounding_error_); | 694 scaled_overscroll_delta + overscroll_rounding_error_); |
| 695 overscroll_rounding_error_ = | 695 overscroll_rounding_error_ = |
| 696 scaled_overscroll_delta - rounded_overscroll_delta; | 696 scaled_overscroll_delta - rounded_overscroll_delta; |
| 697 gfx::Vector2dF fling_velocity_pixels = | 697 gfx::Vector2dF fling_velocity_pixels = |
| 698 gfx::ScaleVector2d(current_fling_velocity, physical_pixel_scale); | 698 gfx::ScaleVector2d(current_fling_velocity, physical_pixel_scale); |
| 699 | 699 |
| 700 client_->DidOverscroll(rounded_overscroll_delta, fling_velocity_pixels); | 700 client_->DidOverscroll(rounded_overscroll_delta, fling_velocity_pixels); |
| 701 } | 701 } |
| 702 | 702 |
| 703 ui::TouchHandleDrawable* BrowserViewRenderer::CreateDrawable() { |
| 704 return client_->CreateDrawable(); |
| 705 } |
| 706 |
| 707 void BrowserViewRenderer::DestroyAllDrawables() { |
| 708 return client_->DestroyAllDrawables(); |
| 709 } |
| 710 |
| 703 void BrowserViewRenderer::PostInvalidate( | 711 void BrowserViewRenderer::PostInvalidate( |
| 704 content::SynchronousCompositor* compositor) { | 712 content::SynchronousCompositor* compositor) { |
| 705 TRACE_EVENT_INSTANT0("android_webview", "BrowserViewRenderer::PostInvalidate", | 713 TRACE_EVENT_INSTANT0("android_webview", "BrowserViewRenderer::PostInvalidate", |
| 706 TRACE_EVENT_SCOPE_THREAD); | 714 TRACE_EVENT_SCOPE_THREAD); |
| 707 if (compositor != compositor_) | 715 if (compositor != compositor_) |
| 708 return; | 716 return; |
| 709 | 717 |
| 710 client_->PostInvalidate(); | 718 client_->PostInvalidate(); |
| 711 } | 719 } |
| 712 | 720 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 732 base::StringAppendF(&str, | 740 base::StringAppendF(&str, |
| 733 "overscroll_rounding_error_: %s ", | 741 "overscroll_rounding_error_: %s ", |
| 734 overscroll_rounding_error_.ToString().c_str()); | 742 overscroll_rounding_error_.ToString().c_str()); |
| 735 base::StringAppendF( | 743 base::StringAppendF( |
| 736 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 744 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 737 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 745 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 738 return str; | 746 return str; |
| 739 } | 747 } |
| 740 | 748 |
| 741 } // namespace android_webview | 749 } // namespace android_webview |
| OLD | NEW |