summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/nav')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp42
1 files changed, 18 insertions, 24 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 5739c78..07b69c7 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -521,18 +521,14 @@ static void copyScrollPositionRecursive(const LayerAndroid* from,
BaseLayerAndroid* getBaseLayer() const { return m_baseLayer; }
-bool setBaseLayer(BaseLayerAndroid* newBaseLayer, SkRegion& inval, bool showVisualIndicator,
+bool setBaseLayer(BaseLayerAndroid* newBaseLayer, bool showVisualIndicator,
bool isPictureAfterFirstLayout)
{
bool queueFull = false;
#if USE(ACCELERATED_COMPOSITING)
- if (m_glWebViewState) {
- // TODO: mark as inval on webkit side
- if (newBaseLayer)
- newBaseLayer->markAsDirty(inval);
+ if (m_glWebViewState)
queueFull = m_glWebViewState->setBaseLayer(newBaseLayer, showVisualIndicator,
isPictureAfterFirstLayout);
- }
#endif
#if ENABLE(ANDROID_OVERFLOW_SCROLL)
@@ -707,6 +703,7 @@ class GLDrawFunctor : Functor {
scale = _scale;
extras = _extras;
};
+
status_t operator()(int messageId, void* data) {
TRACE_METHOD();
@@ -877,15 +874,12 @@ static bool nativeEvaluateLayersAnimations(JNIEnv *env, jobject obj, jint native
return false;
}
-static bool nativeSetBaseLayer(JNIEnv *env, jobject obj, jint nativeView, jint layer, jobject inval,
+static bool nativeSetBaseLayer(JNIEnv *env, jobject obj, jint nativeView, jint layer,
jboolean showVisualIndicator,
jboolean isPictureAfterFirstLayout)
{
BaseLayerAndroid* layerImpl = reinterpret_cast<BaseLayerAndroid*>(layer);
- SkRegion invalRegion;
- if (inval)
- invalRegion = *GraphicsJNI::getNativeRegion(env, inval);
- return ((WebView*)nativeView)->setBaseLayer(layerImpl, invalRegion, showVisualIndicator,
+ return ((WebView*)nativeView)->setBaseLayer(layerImpl, showVisualIndicator,
isPictureAfterFirstLayout);
}
@@ -1125,13 +1119,13 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl)
#endif
}
-static int nativeScrollableLayer(JNIEnv* env, jobject jwebview, jint x, jint y,
- jobject rect, jobject bounds)
+static int nativeScrollableLayer(JNIEnv* env, jobject jwebview, jint nativeView,
+ jint x, jint y, jobject rect, jobject bounds)
{
- WebView* view = GET_NATIVE_VIEW(env, jwebview);
- ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ WebView* webview = reinterpret_cast<WebView*>(nativeView);
+ ALOG_ASSERT(webview, "webview not set in %s", __FUNCTION__);
SkIRect nativeRect, nativeBounds;
- int id = view->scrollableLayer(x, y, &nativeRect, &nativeBounds);
+ int id = webview->scrollableLayer(x, y, &nativeRect, &nativeBounds);
if (rect)
GraphicsJNI::irect_to_jrect(nativeRect, env, rect);
if (bounds)
@@ -1139,15 +1133,15 @@ static int nativeScrollableLayer(JNIEnv* env, jobject jwebview, jint x, jint y,
return id;
}
-static bool nativeScrollLayer(JNIEnv* env, jobject obj, jint layerId, jint x,
- jint y)
+static bool nativeScrollLayer(JNIEnv* env, jobject obj,
+ jint nativeView, jint layerId, jint x, jint y)
{
#if ENABLE(ANDROID_OVERFLOW_SCROLL)
- WebView* view = GET_NATIVE_VIEW(env, obj);
- view->scrollLayer(layerId, x, y);
+ WebView* webview = reinterpret_cast<WebView*>(nativeView);
+ webview->scrollLayer(layerId, x, y);
//TODO: the below only needed for the SW rendering path
- LayerAndroid* baseLayer = view->getBaseLayer();
+ LayerAndroid* baseLayer = webview->getBaseLayer();
if (!baseLayer)
return false;
LayerAndroid* layer = baseLayer->findById(layerId);
@@ -1263,7 +1257,7 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeLayerBounds },
{ "nativeSetHeightCanMeasure", "(Z)V",
(void*) nativeSetHeightCanMeasure },
- { "nativeSetBaseLayer", "(IILandroid/graphics/Region;ZZ)Z",
+ { "nativeSetBaseLayer", "(IIZZ)Z",
(void*) nativeSetBaseLayer },
{ "nativeGetBaseLayer", "()I",
(void*) nativeGetBaseLayer },
@@ -1291,9 +1285,9 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeTileProfilingGetFloat },
{ "nativeStopGL", "()V",
(void*) nativeStopGL },
- { "nativeScrollableLayer", "(IILandroid/graphics/Rect;Landroid/graphics/Rect;)I",
+ { "nativeScrollableLayer", "(IIILandroid/graphics/Rect;Landroid/graphics/Rect;)I",
(void*) nativeScrollableLayer },
- { "nativeScrollLayer", "(III)Z",
+ { "nativeScrollLayer", "(IIII)Z",
(void*) nativeScrollLayer },
{ "nativeSetIsScrolling", "(Z)V",
(void*) nativeSetIsScrolling },