summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-10-24 15:10:04 -0700
committerJohn Reck <jreck@google.com>2011-10-25 16:00:41 -0700
commit42051e3a21322f4843268b4bc09c85b7e9250d6d (patch)
tree08c49b7b51cca26af1587485cf4865eba63b80eb /Source/WebKit/android/nav
parentf6bfe94d8f2312a226d88c9effc5a400df7a72c4 (diff)
downloadexternal_webkit-42051e3a21322f4843268b4bc09c85b7e9250d6d.zip
external_webkit-42051e3a21322f4843268b4bc09c85b7e9250d6d.tar.gz
external_webkit-42051e3a21322f4843268b4bc09c85b7e9250d6d.tar.bz2
DO NOT MERGE Fix SW extras for layers
Bug: 5507239 Also remove all the old, unused layer setExtras stuff Change-Id: Id1670010536712b7a9f50e74821c9fb7f708e851
Diffstat (limited to 'Source/WebKit/android/nav')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp39
1 files changed, 17 insertions, 22 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 493d4b3..4c75b58 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -572,10 +572,6 @@ bool drawGL(WebCore::IntRect& viewRect, WebCore::IntRect* invalRect, WebCore::In
unsigned int pic = m_glWebViewState->currentPictureCounter();
m_glWebViewState->glExtras()->setDrawExtra(extra);
- LayerAndroid* compositeLayer = compositeRoot();
- if (compositeLayer)
- compositeLayer->setExtra(0);
-
SkRect visibleRect;
calcOurContentVisibleRect(&visibleRect);
// Make sure we have valid coordinates. We might not have valid coords
@@ -650,28 +646,27 @@ PictureSet* draw(SkCanvas* canvas, SkColor bgColor, int extras, bool split)
default:
;
}
+#if USE(ACCELERATED_COMPOSITING)
+ LayerAndroid* compositeLayer = compositeRoot();
+ if (compositeLayer) {
+ SkRect visible;
+ calcOurContentVisibleRect(&visible);
+ // call this to be sure we've adjusted for any scrolling or animations
+ // before we actually draw
+ compositeLayer->updateFixedLayersPositions(visible);
+ compositeLayer->updatePositions();
+ // We have to set the canvas' matrix on the base layer
+ // (to have fixed layers work as intended)
+ SkAutoCanvasRestore restore(canvas, true);
+ m_baseLayer->setMatrix(canvas->getTotalMatrix());
+ canvas->resetMatrix();
+ m_baseLayer->draw(canvas);
+ }
+#endif
if (extra) {
IntRect dummy; // inval area, unused for now
extra->draw(canvas, &mainPicture, &dummy);
}
-#if USE(ACCELERATED_COMPOSITING)
- LayerAndroid* compositeLayer = compositeRoot();
- if (!compositeLayer)
- return ret;
- compositeLayer->setExtra(extra);
- SkRect visible;
- calcOurContentVisibleRect(&visible);
- // call this to be sure we've adjusted for any scrolling or animations
- // before we actually draw
- compositeLayer->updateFixedLayersPositions(visible);
- compositeLayer->updatePositions();
- // We have to set the canvas' matrix on the base layer
- // (to have fixed layers work as intended)
- SkAutoCanvasRestore restore(canvas, true);
- m_baseLayer->setMatrix(canvas->getTotalMatrix());
- canvas->resetMatrix();
- m_baseLayer->draw(canvas);
-#endif
return ret;
}