diff options
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/AndroidLog.h | 1 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 1 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 5 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 11 |
4 files changed, 18 insertions, 0 deletions
diff --git a/WebKit/android/AndroidLog.h b/WebKit/android/AndroidLog.h index b5d63e8..a69dce6 100644 --- a/WebKit/android/AndroidLog.h +++ b/WebKit/android/AndroidLog.h @@ -43,5 +43,6 @@ extern FILE* gRenderTreeFile; #endif /* ANDROID_DOM_LOGGING */ #define DISPLAY_TREE_LOG_FILE "/sdcard/displayTree.txt" +#define LAYERS_TREE_LOG_FILE "/sdcard/layersTree.plist" #endif /* ANDROIDLOG_H_ */ diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 4385f4d..d04ac30 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -900,6 +900,7 @@ void WebViewCore::setRootLayer(int layer) env->CallVoidMethod(m_javaGlue->object(env).get(), m_javaGlue->m_setRootLayer, layer); + mRootLayer = layer; checkException(env); } diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 3085a49..a32ba0c 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -129,6 +129,7 @@ namespace android { #if USE(ACCELERATED_COMPOSITING) void immediateRepaint(); void setRootLayer(int layer); + int rootLayer() { return mRootLayer; } #endif /** Invalidate the view/screen, NOT the content/DOM, but expressed in @@ -544,6 +545,10 @@ namespace android { uint32_t m_now; #endif +#if USE(ACCELERATED_COMPOSITING) + int mRootLayer; +#endif + private: // called from constructor, to add this to a global list static void addInstance(WebViewCore*); diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 4a80210..193a86e 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -2042,6 +2042,17 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl) fwrite("\n", 1, 1, file); fclose(file); } +#if USE(ACCELERATED_COMPOSITING) + int pRootLayer = view->getWebViewCore()->rootLayer(); + if (pRootLayer) { + LayerAndroid* rootLayer = reinterpret_cast<LayerAndroid*>(pRootLayer); + FILE* file = fopen(LAYERS_TREE_LOG_FILE,"w"); + if (file) { + rootLayer->dumpLayers(file, 0); + fclose(file); + } + } +#endif } #endif } |