diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-02-16 11:26:46 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-02-16 14:27:57 -0800 |
commit | 03d850006e8ce54945fe44c36ffaf074143184c5 (patch) | |
tree | 07856002ecf87fbb8bcc4eeb367c0ecd694f5259 /WebKit/android | |
parent | 5ad675d34069bcdf6bcd983ae4941c0531216354 (diff) | |
download | external_webkit-03d850006e8ce54945fe44c36ffaf074143184c5.zip external_webkit-03d850006e8ce54945fe44c36ffaf074143184c5.tar.gz external_webkit-03d850006e8ce54945fe44c36ffaf074143184c5.tar.bz2 |
Adding a debug setting to enable visual indicator for GL
[This is the webkit part]
The idea is to turn on the visual indicator without building the code.
The implementation included:
1. Setup the UI on browser side to check whether or not this is enabled.
2. Transfer the info from browser setting to web setting.
3. Send this info down from WebView to webkit.
4. In the webkit, we save this info in TilesManager.
5. At texture generation time, we query this info to decide whether or not
add the visual indicator on the texture.
One design decision we made is we don't want to restart the browser for
debugging purpose. This is better preserving the browser current activity,
the only pitfall is that the visual indicator is NOT updated on different
textures simultaneously.
The dependent webView change is #change,97055
bug:3458721
Change-Id: I0ce51d7ac7de66ccdb95c9bf1f0edc7ec688622f
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index deb2b28..edd362c 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -438,7 +438,7 @@ bool drawGL(WebCore::IntRect& viewRect, float scale, int extras) 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); + m_glWebViewState->setBaseLayer(m_baseLayer, rect, false); } } @@ -1383,11 +1383,11 @@ static void copyScrollPositionRecursive(const LayerAndroid* from, } #endif -void setBaseLayer(BaseLayerAndroid* layer, WebCore::IntRect& rect) +void setBaseLayer(BaseLayerAndroid* layer, WebCore::IntRect& rect, bool showVisualIndicator) { #if USE(ACCELERATED_COMPOSITING) if (m_glWebViewState) - m_glWebViewState->setBaseLayer(layer, rect); + m_glWebViewState->setBaseLayer(layer, rect, showVisualIndicator); #endif #if ENABLE(ANDROID_OVERFLOW_SCROLL) @@ -1770,11 +1770,12 @@ 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 jrect, + jboolean showVisualIndicator) { BaseLayerAndroid* layerImpl = reinterpret_cast<BaseLayerAndroid*>(layer); WebCore::IntRect rect = jrect_to_webrect(env, jrect); - GET_NATIVE_VIEW(env, obj)->setBaseLayer(layerImpl, rect); + GET_NATIVE_VIEW(env, obj)->setBaseLayer(layerImpl, rect, showVisualIndicator); } static void nativeReplaceBaseContent(JNIEnv *env, jobject obj, jint content) @@ -2566,7 +2567,7 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeSetFindIsUp }, { "nativeSetHeightCanMeasure", "(Z)V", (void*) nativeSetHeightCanMeasure }, - { "nativeSetBaseLayer", "(ILandroid/graphics/Rect;)V", + { "nativeSetBaseLayer", "(ILandroid/graphics/Rect;Z)V", (void*) nativeSetBaseLayer }, { "nativeReplaceBaseContent", "(I)V", (void*) nativeReplaceBaseContent }, |