[WK2] Use fixed scale to animation layer.
authorJungJik Lee <jungjik.lee@samsung.com>
Tue, 30 Apr 2013 07:35:55 +0000 (16:35 +0900)
committerJungJik Lee <jungjik.lee@samsung.com>
Fri, 3 May 2013 05:26:52 +0000 (14:26 +0900)
[Title] [WK2] Use fixed scale to animation layer.
[Issue#] P130426-4323
[Problem] while pulling the list, the list page is blurred in mobile twitter page.
[Cause] small zoom scale is applied to an animation layer
[Solution] if the layer is an animation layer, use fixed zoom scale.

Change-Id: Ia7c6cd78a1e8c9a2f73516dec913c22131714296

Source/WTF/wtf/Platform.h
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h

index cf15c11..baf08f0 100644 (file)
 #define ENABLE_TIZEN_PREVENT_CRASH_OF_UI_SIDE_ANIMATION 1 /* Hurnjoo Lee(hurnjoo.lee@samsung.com) : Prevent crashes of UI side animation */
 #define ENABLE_TIZEN_WEBKIT2_PRE_RENDERING_WITH_DIRECTIVITY 1 /*JungJik Lee(jungjik.lee@samsung.com : Calculates cover-rect with trajectory vector scalar value to consider directivity. */
 #define ENABLE_TIZEN_CSS_OVERFLOW_CLIPPING_BACKING_STORE 0 /* JungJik Lee(jungjik.lee@samsung.com) : Clipping BackingStore off if parent layer is css overflow hidden */
+#define ENABLE_TIZEN_USE_FIXED_SCALE_ANIMATION 1 /* JungJik Lee(jungjik.lee@samsung.com) : use fixed scale if the layer is animating */
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
 #define TIZEN_VIRTUAL virtual
 #else
index 9cb8f25..33669b3 100755 (executable)
@@ -125,6 +125,9 @@ WebGraphicsLayer::WebGraphicsLayer(GraphicsLayerClient* client)
 #endif
     , m_webGraphicsLayerClient(0)
     , m_contentsScale(1)
+#if ENABLE(TIZEN_USE_FIXED_SCALE_ANIMATION)
+    , m_fixedAnimationScale(1)
+#endif
     , m_canvasPlatformLayer(0)
     , m_animationStartedTimer(this, &WebGraphicsLayer::animationStartedTimerFired)
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_SCROLLBAR)
@@ -685,12 +688,22 @@ void WebGraphicsLayer::setVisibleContentRectTrajectoryVector(const FloatPoint& t
 
 void WebGraphicsLayer::setContentsScale(float scale)
 {
+#if ENABLE(TIZEN_USE_FIXED_SCALE_ANIMATION)
+    if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))
+        m_fixedAnimationScale = scale;
+#endif
+
     m_contentsScale = scale;
     adjustContentsScale();
 }
 
 float WebGraphicsLayer::effectiveContentsScale()
 {
+#if ENABLE(TIZEN_USE_FIXED_SCALE_ANIMATION)
+    if (m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))
+        return m_fixedAnimationScale;
+#endif
+
     return selfOrAncestorHaveNonAffineTransforms() ? 1 : m_contentsScale;
 }
 
index 044468c..172529b 100755 (executable)
@@ -288,6 +288,9 @@ private:
     OwnPtr<WebCore::TiledBackingStore> m_mainBackingStore;
     OwnPtr<WebCore::TiledBackingStore> m_previousBackingStore;
     float m_contentsScale;
+#if ENABLE(TIZEN_USE_FIXED_SCALE_ANIMATION)
+    float m_fixedAnimationScale;
+#endif
 
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
     IntRect m_visibleRect;