diff options
author | tedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-24 01:36:40 +0000 |
---|---|---|
committer | tedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-24 01:36:40 +0000 |
commit | d908376a0defe2776b3cd03ee5dd8b9df7b6ca8e (patch) | |
tree | d94000106a204858c92feefb9602fcab4334e75e /content/browser/android | |
parent | 334ec0a0edaae51da3a9b267a1c5af441fe50f7c (diff) | |
download | chromium_src-d908376a0defe2776b3cd03ee5dd8b9df7b6ca8e.zip chromium_src-d908376a0defe2776b3cd03ee5dd8b9df7b6ca8e.tar.gz chromium_src-d908376a0defe2776b3cd03ee5dd8b9df7b6ca8e.tar.bz2 |
Expose a concept of bottom overdraw amount for cc drawing viewport.
When the physical output surface is larger than the visible viewport,
we need to subtract the overdraw to ensure you can scroll to the
full content of the page.
Resizing the output surface is expensive on mobile devices, so we
minimize resizes and deal with this size mismatch.
BUG=161303, 221995
Review URL: https://chromiumcodereview.appspot.com/12437023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/android')
-rw-r--r-- | content/browser/android/content_view_core_impl.cc | 9 | ||||
-rw-r--r-- | content/browser/android/content_view_core_impl.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 96916f4..f59129f 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -624,6 +624,15 @@ gfx::Size ContentViewCoreImpl::GetViewportSizeDip() const { gfx::ScaleSize(GetViewportSizePix(), 1.0f / GetDpiScale())); } +float ContentViewCoreImpl::GetOverdrawBottomHeightDip() const { + JNIEnv* env = AttachCurrentThread(); + ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); + if (j_obj.is_null()) + return 0.f; + return Java_ContentViewCore_getOverdrawBottomHeightPix(env, j_obj.obj()) + / GetDpiScale(); +} + InputEventAckState ContentViewCoreImpl::FilterInputEvent( const WebKit::WebInputEvent& input_event) { if (!input_event_filter_) diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h index ebcc585..ba17590 100644 --- a/content/browser/android/content_view_core_impl.h +++ b/content/browser/android/content_view_core_impl.h @@ -272,6 +272,7 @@ class ContentViewCoreImpl : public ContentViewCore, gfx::Size GetPhysicalBackingSize() const; gfx::Size GetViewportSizeDip() const; + float GetOverdrawBottomHeightDip() const; InputEventAckState FilterInputEvent(const WebKit::WebInputEvent& input_event); |