summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2011-01-26 19:21:28 +0000
committerDave Burke <daveburke@google.com>2011-01-27 19:42:39 +0000
commit2e8fd2e525063fd6962c5a958d4aaca8b3974f79 (patch)
tree02009dca86d5dace1c1a22c70e99d7570abe3363 /WebCore/platform/graphics/android/BaseLayerAndroid.cpp
parent85e27b62cf6f85f2e8d5694b285be78a3a090b22 (diff)
downloadexternal_webkit-2e8fd2e525063fd6962c5a958d4aaca8b3974f79.zip
external_webkit-2e8fd2e525063fd6962c5a958d4aaca8b3974f79.tar.gz
external_webkit-2e8fd2e525063fd6962c5a958d4aaca8b3974f79.tar.bz2
Have different x-fade rates for zoom in vs zoom out.
Tweak up transitions to make zooming feel faster. bug:3394378 Change-Id: I39a7e5785c3ab44d0245267a3137e7f87489efcd
Diffstat (limited to 'WebCore/platform/graphics/android/BaseLayerAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/BaseLayerAndroid.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 52ef8ca..b6177aa 100644
--- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -195,13 +195,15 @@ bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale)
// the two pages (current one and future one with the new scale factor)
if (m_glWebViewState->scaleRequestState() == GLWebViewState::kReceivedNewScale) {
TiledPage* nextTiledPage = m_glWebViewState->backPage();
- double transitionTime = m_glWebViewState->transitionTime(currentTime);
+ double transitionTime = (scale < m_glWebViewState->currentScale()) ?
+ m_glWebViewState->zoomOutTransitionTime(currentTime) :
+ m_glWebViewState->zoomInTransitionTime(currentTime);
float newTilesTransparency = 1;
if (scale < m_glWebViewState->currentScale())
- newTilesTransparency = 1 - m_glWebViewState->transparency(currentTime);
+ newTilesTransparency = 1 - m_glWebViewState->zoomOutTransparency(currentTime);
else
- transparency = m_glWebViewState->transparency(currentTime);
+ transparency = m_glWebViewState->zoomInTransparency(currentTime);
nextTiledPage->draw(newTilesTransparency, viewportTileBounds);