summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-12-03 10:00:15 -0500
committerPatrick Scott <phanna@android.com>2010-12-03 10:34:07 -0500
commit8598c9fb9f861f25ab14efde9efb19cb91d7df1c (patch)
treeefd772c4ece32369665f5af68c217c5e600d5b8b /WebKit/android/jni
parent82f247bdbb98dd80c44209d87692c650c3704617 (diff)
downloadexternal_webkit-8598c9fb9f861f25ab14efde9efb19cb91d7df1c.zip
external_webkit-8598c9fb9f861f25ab14efde9efb19cb91d7df1c.tar.gz
external_webkit-8598c9fb9f861f25ab14efde9efb19cb91d7df1c.tar.bz2
Attempt to scroll layers everytime the user drags.
This is part of a frameworks/base change. Use the composite root bounds for the inval region when updating the UI picture. This fixes several drawing issues with outdated pictures. Bug: 3022562 Change-Id: Ic28cfbbe381fdd59368a6d83bb73b01df912b530
Diffstat (limited to 'WebKit/android/jni')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 5f5bb53..f134cb6 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -3557,10 +3557,17 @@ void WebViewCore::addVisitedLink(const UChar* string, int length)
m_groupForVisitedLinks->addVisitedLink(string, length);
}
-static jint UpdateLayers(JNIEnv *env, jobject obj)
+static jint UpdateLayers(JNIEnv *env, jobject obj, jobject region)
{
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
BaseLayerAndroid* result = viewImpl->createBaseLayer();
+ SkRegion* nativeRegion = GraphicsJNI::getNativeRegion(env, region);
+ if (result) {
+ SkIRect bounds;
+ LayerAndroid* root = static_cast<LayerAndroid*>(result->getChild(0));
+ root->bounds().roundOut(&bounds);
+ nativeRegion->setRect(bounds);
+ }
return reinterpret_cast<jint>(result);
}
@@ -4096,7 +4103,7 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = {
(void*) UpdateFrameCache },
{ "nativeGetContentMinPrefWidth", "()I",
(void*) GetContentMinPrefWidth },
- { "nativeUpdateLayers", "()I",
+ { "nativeUpdateLayers", "(Landroid/graphics/Region;)I",
(void*) UpdateLayers },
{ "nativeRecordContent", "(Landroid/graphics/Region;Landroid/graphics/Point;)I",
(void*) RecordContent },