diff options
author | Nicolas Roard <nicolas@android.com> | 2011-03-07 11:14:44 -0800 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2011-03-08 18:55:55 -0800 |
commit | 67e4aa15702646d5ff50e9524f4e63eb9ed20122 (patch) | |
tree | 054c51b8413613ea13248dad4fae47f1bd4f2426 /WebKit/android/nav | |
parent | deb796f509e2ad13b4ef4c01b1a1e707b4e762ee (diff) | |
download | external_webkit-67e4aa15702646d5ff50e9524f4e63eb9ed20122.zip external_webkit-67e4aa15702646d5ff50e9524f4e63eb9ed20122.tar.gz external_webkit-67e4aa15702646d5ff50e9524f4e63eb9ed20122.tar.bz2 |
Partial invalidation of the browser textures
bug:3461349 bug:3464483
Change-Id: I627f06d0fe48aaa0adca65cd13dc738af87eeefc
Diffstat (limited to 'WebKit/android/nav')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 6c7b2d3..6bf5558 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -437,8 +437,11 @@ bool drawGL(WebCore::IntRect& viewRect, float scale, int extras) if (!m_glWebViewState) { m_glWebViewState = new GLWebViewState(&m_viewImpl->gButtonMutex); if (m_baseLayer->content()) { - IntRect rect(0, 0, m_baseLayer->content()->width(), m_baseLayer->content()->height()); - m_glWebViewState->setBaseLayer(m_baseLayer, rect, false); + SkRegion region; + SkIRect rect; + rect.set(0, 0, m_baseLayer->content()->width(), m_baseLayer->content()->height()); + region.setRect(rect); + m_glWebViewState->setBaseLayer(m_baseLayer, region, false); } } @@ -1383,11 +1386,11 @@ static void copyScrollPositionRecursive(const LayerAndroid* from, } #endif -void setBaseLayer(BaseLayerAndroid* layer, WebCore::IntRect& rect, bool showVisualIndicator) +void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndicator) { #if USE(ACCELERATED_COMPOSITING) if (m_glWebViewState) - m_glWebViewState->setBaseLayer(layer, rect, showVisualIndicator); + m_glWebViewState->setBaseLayer(layer, inval, showVisualIndicator); #endif #if ENABLE(ANDROID_OVERFLOW_SCROLL) @@ -1797,12 +1800,14 @@ static bool nativeEvaluateLayersAnimations(JNIEnv *env, jobject obj) return false; } -static void nativeSetBaseLayer(JNIEnv *env, jobject obj, jint layer, jobject jrect, +static void nativeSetBaseLayer(JNIEnv *env, jobject obj, jint layer, jobject inval, jboolean showVisualIndicator) { BaseLayerAndroid* layerImpl = reinterpret_cast<BaseLayerAndroid*>(layer); - WebCore::IntRect rect = jrect_to_webrect(env, jrect); - GET_NATIVE_VIEW(env, obj)->setBaseLayer(layerImpl, rect, showVisualIndicator); + SkRegion invalRegion; + if (inval) + invalRegion = *GraphicsJNI::getNativeRegion(env, inval); + GET_NATIVE_VIEW(env, obj)->setBaseLayer(layerImpl, invalRegion, showVisualIndicator); } static void nativeReplaceBaseContent(JNIEnv *env, jobject obj, jint content) @@ -2594,7 +2599,7 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeSetFindIsUp }, { "nativeSetHeightCanMeasure", "(Z)V", (void*) nativeSetHeightCanMeasure }, - { "nativeSetBaseLayer", "(ILandroid/graphics/Rect;Z)V", + { "nativeSetBaseLayer", "(ILandroid/graphics/Region;Z)V", (void*) nativeSetBaseLayer }, { "nativeReplaceBaseContent", "(I)V", (void*) nativeReplaceBaseContent }, |