X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=Source%2FWebKit%2Fandroid%2Fjni%2FWebViewCore.cpp;h=1e406b1c0bab86c2de19bc3fb4d248edd8c624c2;hb=b627d5bd0e9b9a4d02131ef694467bfb62b9fb7f;hp=b998e99b52b36c30b3452a3073e8575108462918;hpb=f62e398f3b87d76e44d18441fa090c18dcc8be82;p=android-x86%2Fexternal-webkit.git diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index b998e99b5..1e406b1c0 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -673,10 +673,20 @@ void WebViewCore::recordPictureSet(PictureSet* content) content->clear(); #if USE(ACCELERATED_COMPOSITING) - // Detects if the content size has changed - bool contentSizeChanged = false; - if (content->width() != width || content->height() != height) - contentSizeChanged = true; + // The invals are not always correct when the content size has changed. For + // now, let's just reset the inval so that it invalidates the entire content + // -- the pictureset will be fully repainted, tiles will be marked dirty and + // will have to be repainted. + + // FIXME: the webkit invals ought to have been enough... + if (content->width() != width || content->height() != height) { + SkIRect r; + r.fLeft = 0; + r.fTop = 0; + r.fRight = width; + r.fBottom = height; + m_addInval.setRect(r); + } #endif content->setDimensions(width, height, &m_addInval); @@ -700,23 +710,6 @@ void WebViewCore::recordPictureSet(PictureSet* content) // Rebuild the pictureset (webkit repaint) rebuildPictureSet(content); - -#if USE(ACCELERATED_COMPOSITING) - // We repainted the pictureset, but the invals are not always correct when - // the content size did change. For now, let's just reset the - // inval we will pass to the UI so that it invalidates the entire - // content -- tiles will be marked dirty and will have to be repainted. - // FIXME: the webkit invals ought to have been enough... - if (contentSizeChanged) { - SkIRect r; - r.fLeft = 0; - r.fTop = 0; - r.fRight = width; - r.fBottom = height; - m_addInval.setRect(r); - } -#endif - } // WebViewCoreRecordTimeCounter WebCore::Node* oldFocusNode = currentFocus();