summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/Android.mk2
-rw-r--r--WebCore/page/FrameView.cpp3
-rw-r--r--WebCore/platform/graphics/android/BaseLayerAndroid.cpp6
-rw-r--r--WebKit/android/nav/CachedRoot.cpp24
4 files changed, 29 insertions, 6 deletions
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 5b15b01..8aa16d9 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -354,12 +354,12 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
html/canvas/ArrayBuffer.cpp \
html/canvas/ArrayBufferView.cpp \
html/canvas/CanvasGradient.cpp \
- html/canvas/DataView.cpp \
html/canvas/CanvasPattern.cpp \
html/canvas/CanvasPixelArray.cpp \
html/canvas/CanvasRenderingContext.cpp \
html/canvas/CanvasRenderingContext2D.cpp \
html/canvas/CanvasStyle.cpp \
+ html/canvas/DataView.cpp \
html/canvas/Float32Array.cpp \
html/canvas/Int16Array.cpp \
html/canvas/Int32Array.cpp \
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index d9a7e98..08e55a5 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -569,6 +569,7 @@ void FrameView::setNeedsOneShotDrawingSynchronization()
#if ENABLE(ANDROID_OVERFLOW_SCROLL)
bool FrameView::hasOverflowScroll() const
{
+#ifndef ANDROID_FLATTEN_IFRAME
RenderObject* ownerRenderer = m_frame->ownerRenderer();
if (!ownerRenderer || !ownerRenderer->isRenderIFrame())
return false;
@@ -586,6 +587,8 @@ bool FrameView::hasOverflowScroll() const
if (contentsWidth() <= layoutWidth() && contentsHeight() <= layoutHeight())
return false;
return true;
+#endif
+ return false;
}
#endif
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 1a08b3c..fe8150c 100644
--- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -114,7 +114,8 @@ void BaseLayerAndroid::drawCanvas(SkCanvas* canvas)
#if USE(ACCELERATED_COMPOSITING)
android::Mutex::Autolock lock(m_drawLock);
#endif
- if (!m_content.isEmpty())
+ // TODO: After the isEmpty check fixed, we can remove the GL dependency here.
+ if (m_glWebViewState || !m_content.isEmpty())
m_content.draw(canvas);
// TODO : replace with !m_extra.isEmpty() once such a call exists
if (m_extra.width() > 0)
@@ -124,7 +125,8 @@ void BaseLayerAndroid::drawCanvas(SkCanvas* canvas)
#if USE(ACCELERATED_COMPOSITING)
bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale)
{
- if (m_content.isEmpty())
+ // TODO: After the isEmpty check fixed, we can remove the GL dependency here.
+ if (!m_glWebViewState && m_content.isEmpty())
return false;
if (!m_glWebViewState)
return false;
diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp
index 7bedd4f..d529a00 100644
--- a/WebKit/android/nav/CachedRoot.cpp
+++ b/WebKit/android/nav/CachedRoot.cpp
@@ -876,11 +876,11 @@ public:
layers->getBounds().fRight, layers->getBounds().fBottom,
collectGlyphs ? "true" : "false",
mTestBounds.intersects(*layers) ? "true" : "false",
- mTestBounds.contains(*layers) ? "true" : "false");
+ mTextSlop.contains(*layers) ? "true" : "false");
if (collectGlyphs && layerType == kDrawGlyph_Type) {
if (!mTestBounds.intersects(*layers))
continue;
- if (!mTestBounds.contains(*layers))
+ if (!mTextSlop.contains(*layers))
return false;
foundGlyph = true;
}
@@ -898,7 +898,11 @@ protected:
&& mType != kDrawSprite_Type && mType != kDrawBitmap_Type)
return false;
if (mLayerTypes.isEmpty() || mLayerTypes.last() != mType
- || !mAppendLikeTypes) {
+ || !mAppendLikeTypes
+ // if the last was a rect, and the current one is also a rect,
+ // but the two rects have a gap between, don't join them -- push
+ // an empty between them
+ || (mType == kDrawRect_Type && !joinable(rect))) {
push(mType, mEmpty);
}
DBG_NAV_LOGD("RingCheck join %s (%d,%d,r=%d,b=%d) '%c'",
@@ -995,6 +999,20 @@ private:
}
}
+ bool joinable(const SkIRect& rect)
+ {
+ SkRegion region = mLayers.last();
+ if (!region.isRect())
+ return false;
+ const SkIRect& bounds1 = region.getBounds();
+ int area1 = bounds1.width() * bounds1.height();
+ area1 += rect.width() * rect.height();
+ region.op(rect, SkRegion::kUnion_Op);
+ const SkIRect& bounds2 = region.getBounds();
+ int area2 = bounds2.width() * bounds2.height();
+ return area2 <= area1;
+ }
+
void popEmpty()
{
if (mLayerTypes.size() == 0)