summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2011-03-16 11:31:36 -0700
committerShimeng (Simon) Wang <swang@google.com>2011-03-16 13:56:05 -0700
commit6a3bd3f2b6b5a5c80e5fc1674550456b67e2cc7c (patch)
tree51ff3d56bd6cf8442ff1d1d02c3912837e60460e /WebKit
parentab60a5124c80ef3bbbe80a8ad714f07457d29f98 (diff)
downloadexternal_webkit-6a3bd3f2b6b5a5c80e5fc1674550456b67e2cc7c.zip
external_webkit-6a3bd3f2b6b5a5c80e5fc1674550456b67e2cc7c.tar.gz
external_webkit-6a3bd3f2b6b5a5c80e5fc1674550456b67e2cc7c.tar.bz2
For first layout, reset current textures and update base layer.
issue: 4094300 Change-Id: If8e58daa621e01ac372f2111ebde522a6f90b2e5
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/nav/WebView.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 6bf5558..0762fb9 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -441,7 +441,7 @@ bool drawGL(WebCore::IntRect& viewRect, float scale, int extras)
SkIRect rect;
rect.set(0, 0, m_baseLayer->content()->width(), m_baseLayer->content()->height());
region.setRect(rect);
- m_glWebViewState->setBaseLayer(m_baseLayer, region, false);
+ m_glWebViewState->setBaseLayer(m_baseLayer, region, false, false);
}
}
@@ -1386,11 +1386,13 @@ static void copyScrollPositionRecursive(const LayerAndroid* from,
}
#endif
-void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndicator)
+void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndicator,
+ bool isPictureAfterFirstLayout)
{
#if USE(ACCELERATED_COMPOSITING)
if (m_glWebViewState)
- m_glWebViewState->setBaseLayer(layer, inval, showVisualIndicator);
+ m_glWebViewState->setBaseLayer(layer, inval, showVisualIndicator,
+ isPictureAfterFirstLayout);
#endif
#if ENABLE(ANDROID_OVERFLOW_SCROLL)
@@ -1801,13 +1803,15 @@ static bool nativeEvaluateLayersAnimations(JNIEnv *env, jobject obj)
}
static void nativeSetBaseLayer(JNIEnv *env, jobject obj, jint layer, jobject inval,
- jboolean showVisualIndicator)
+ jboolean showVisualIndicator,
+ jboolean isPictureAfterFirstLayout)
{
BaseLayerAndroid* layerImpl = reinterpret_cast<BaseLayerAndroid*>(layer);
SkRegion invalRegion;
if (inval)
invalRegion = *GraphicsJNI::getNativeRegion(env, inval);
- GET_NATIVE_VIEW(env, obj)->setBaseLayer(layerImpl, invalRegion, showVisualIndicator);
+ GET_NATIVE_VIEW(env, obj)->setBaseLayer(layerImpl, invalRegion, showVisualIndicator,
+ isPictureAfterFirstLayout);
}
static void nativeReplaceBaseContent(JNIEnv *env, jobject obj, jint content)
@@ -2599,7 +2603,7 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeSetFindIsUp },
{ "nativeSetHeightCanMeasure", "(Z)V",
(void*) nativeSetHeightCanMeasure },
- { "nativeSetBaseLayer", "(ILandroid/graphics/Region;Z)V",
+ { "nativeSetBaseLayer", "(ILandroid/graphics/Region;ZZ)V",
(void*) nativeSetBaseLayer },
{ "nativeReplaceBaseContent", "(I)V",
(void*) nativeReplaceBaseContent },