summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-12-19 15:10:47 -0800
committerJohn Reck <jreck@google.com>2012-01-11 14:19:06 -0800
commita263300f202a4456570ae6e29e589b5e85309a7b (patch)
tree3d23bf240d6ba66f029f7cc2d8d597fd086c21ab /Source/WebKit/android/nav/WebView.cpp
parent3c3d37e22bc472db3c836a0d97e7467058f62c9e (diff)
downloadexternal_webkit-a263300f202a4456570ae6e29e589b5e85309a7b.zip
external_webkit-a263300f202a4456570ae6e29e589b5e85309a7b.tar.gz
external_webkit-a263300f202a4456570ae6e29e589b5e85309a7b.tar.bz2
Initial NavCache removal
Change-Id: Id34d3be6b11c4ba77b59dd9fb01a9cc050d581f6
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 64ab9d9..9bf95e5 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -191,7 +191,6 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir,
env->SetIntField(javaWebView, gWebViewField, (jint)this);
m_viewImpl = (WebViewCore*) viewImpl;
m_frameCacheUI = 0;
- m_navPictureUI = 0;
m_generation = 0;
m_heightCanMeasure = false;
m_lastDx = 0;
@@ -222,7 +221,6 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir,
stopGL();
#endif
delete m_frameCacheUI;
- delete m_navPictureUI;
SkSafeUnref(m_baseLayer);
delete m_glDrawFunctor;
delete m_buttonSkin;
@@ -549,7 +547,6 @@ PictureSet* draw(SkCanvas* canvas, SkColor bgColor, int extras, bool split)
if (extras == DrawExtrasCursorRing)
resetCursorRing();
}
- LayerAndroid mainPicture(m_navPictureUI);
DrawExtra* extra = 0;
switch (extras) {
case DrawExtrasFind:
@@ -584,12 +581,12 @@ PictureSet* draw(SkCanvas* canvas, SkColor bgColor, int extras, bool split)
m_baseLayer->setMatrix(canvas->getTotalMatrix());
canvas->resetMatrix();
m_baseLayer->draw(canvas);
+ if (extra) {
+ IntRect dummy; // inval area, unused for now
+ extra->draw(canvas, compositeLayer, &dummy);
+ }
}
#endif
- if (extra) {
- IntRect dummy; // inval area, unused for now
- extra->draw(canvas, &mainPicture, &dummy);
- }
return ret;
}
@@ -707,12 +704,9 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer)
}
m_viewImpl->gFrameCacheMutex.lock();
delete m_frameCacheUI;
- SkSafeUnref(m_navPictureUI);
m_viewImpl->m_updatedFrameCache = false;
m_frameCacheUI = m_viewImpl->m_frameCacheKit;
- m_navPictureUI = m_viewImpl->m_navPictureKit;
m_viewImpl->m_frameCacheKit = 0;
- m_viewImpl->m_navPictureKit = 0;
m_viewImpl->gFrameCacheMutex.unlock();
if (m_frameCacheUI)
m_frameCacheUI->setRootLayer(compositeRoot());
@@ -1528,7 +1522,6 @@ private: // local state for WebView
CachedRoot* m_frameCacheUI; // navigation data ready for use
WebViewCore* m_viewImpl;
int m_generation; // associate unique ID with sent kit focus to match with ui
- SkPicture* m_navPictureUI;
SkMSec m_ringAnimationEnd;
// Corresponds to the same-named boolean on the java side.
bool m_heightCanMeasure;
@@ -2730,6 +2723,15 @@ static void nativeSetPauseDrawing(JNIEnv *env, jobject obj, jint nativeView,
((WebView*)nativeView)->m_isDrawingPaused = pause;
}
+static bool nativeDisableNavcache(JNIEnv *env, jobject obj)
+{
+#if ENABLE(ANDROID_NAVCACHE)
+ return false;
+#else
+ return true;
+#endif
+}
+
/*
* JNI registration
*/
@@ -2946,6 +2948,8 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeOnTrimMemory },
{ "nativeSetPauseDrawing", "(IZ)V",
(void*) nativeSetPauseDrawing },
+ { "nativeDisableNavcache", "()Z",
+ (void*) nativeDisableNavcache },
};
int registerWebView(JNIEnv* env)