diff options
Diffstat (limited to 'Source')
5 files changed, 17 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index e0d48ee..76d7324 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -141,7 +141,7 @@ bool GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, bool showVisualIndica m_layersRenderingMode = kAllTextures; } if (layer) { - XLOG("new base layer %p, (inval region empty %d) with child %p", layer, inval.isEmpty(), layer->getChild(0)); + XLOG("new base layer %p, with child %p", layer, layer->getChild(0)); layer->setState(this); } bool queueFull = m_treeManager.updateWithTree(layer, isPictureAfterFirstLayout); diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp index 79c02eb..83fb414 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -685,13 +685,16 @@ void LayerAndroid::updateGLPositionsAndScale(const TransformationMatrix& parentM // now apply it to our children + TransformationMatrix childMatrix; + childMatrix = localMatrix; + childMatrix.translate3d(m_offset.x(), m_offset.y(), 0); if (!m_childrenTransform.isIdentity()) { - localMatrix.translate(getSize().width() * 0.5f, getSize().height() * 0.5f); - localMatrix.multiply(m_childrenTransform); - localMatrix.translate(-getSize().width() * 0.5f, -getSize().height() * 0.5f); + childMatrix.translate(getSize().width() * 0.5f, getSize().height() * 0.5f); + childMatrix.multiply(m_childrenTransform); + childMatrix.translate(-getSize().width() * 0.5f, -getSize().height() * 0.5f); } for (int i = 0; i < count; i++) - this->getChild(i)->updateGLPositionsAndScale(localMatrix, drawClip(), opacity, scale); + this->getChild(i)->updateGLPositionsAndScale(childMatrix, drawClip(), opacity, scale); } void LayerAndroid::setContentsImage(SkBitmapRef* img) diff --git a/Source/WebCore/platform/graphics/android/ShaderProgram.cpp b/Source/WebCore/platform/graphics/android/ShaderProgram.cpp index 59c1271..4925bd6 100644 --- a/Source/WebCore/platform/graphics/android/ShaderProgram.cpp +++ b/Source/WebCore/platform/graphics/android/ShaderProgram.cpp @@ -38,6 +38,9 @@ #include <wtf/CurrentTime.h> #include <wtf/text/CString.h> +#undef XLOGC +#define XLOGC(...) android_printLog(ANDROID_LOG_DEBUG, "ShaderProgram", __VA_ARGS__) + #ifdef DEBUG #undef XLOG @@ -45,10 +48,10 @@ #else -#undef XLOGC -#define XLOGC(...) android_printLog(ANDROID_LOG_DEBUG, "ShaderProgram", __VA_ARGS__) +#undef XLOG +#define XLOG(...) -#endif +#endif // DEBUG namespace WebCore { diff --git a/Source/WebCore/platform/graphics/android/TiledPage.cpp b/Source/WebCore/platform/graphics/android/TiledPage.cpp index 8c43fc4..7aac242 100644 --- a/Source/WebCore/platform/graphics/android/TiledPage.cpp +++ b/Source/WebCore/platform/graphics/android/TiledPage.cpp @@ -353,7 +353,7 @@ bool TiledPage::swapBuffersIfReady(const SkIRect& tileBounds, float scale) swaps++; } - XLOG("%p greedy swapped %d textures, returning true", this, swaps); + XLOG("%p greedy swapped %d textures, returning %d", this, swaps, fullSwap); return fullSwap; } diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index e6e2225..9e3c094 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -1311,7 +1311,8 @@ int getHandleLayerId(SelectText::HandleId handleId, SkIRect& cursorRect) { m_baseLayer->updateLayerPositions(m_visibleRect); LayerAndroid* root = compositeRoot(); LayerAndroid* layer = root ? root->findById(layerId) : 0; - rect = layer->drawTransform()->mapRect(rect); + if (layer && layer->drawTransform()) + rect = layer->drawTransform()->mapRect(rect); } cursorRect.set(rect.x(), rect.y(), rect.maxX(), rect.maxY()); return layerId; |