Prerender first frame of new view size before angle is changed.
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_view.cpp
index f1f1642..025eb76 100755 (executable)
@@ -940,7 +940,8 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
                 drawingArea->setSize(IntSize(width, height), IntSize());
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
-                impl->pageClient->updateViewportSize(IntSize(width, height));
+                Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
+                impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
                 if (ewk_view_is_opengl_backend(ewkView))
                     impl->pageClient->displayViewport();
 #endif
@@ -4704,3 +4705,34 @@ void ewk_view_exceeded_local_file_system_quota_reply(Evas_Object* ewkView, Eina_
     UNUSED_PARAM(result);
 #endif
 }
+
+void ewk_view_rotation_prepare(Evas_Object* ewkView, int angle)
+{
+#if ENABLE(TIZEN_PRERENDERING_FOR_ROTATION)
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+    int width, height;
+    if (angle == 0 || angle == 180) {
+        width = WebCore::getDefaultScreenResolution().width();
+        height = WebCore::getDefaultScreenResolution().height() + 100;
+    }
+    if (angle == 90 || angle == 270) {
+        width = WebCore::getDefaultScreenResolution().height();
+        height = WebCore::getDefaultScreenResolution().width() + 100;
+    }
+
+    impl->pageProxy->drawingArea()->setSize(IntSize(width, height), IntSize());
+    impl->pageClient->setWaitFrameOfNewViewortSize(true);
+    ewk_view_suspend(ewkView);
+    impl->pageClient->updateViewportSize(IntSize(width, height), angle);
+#endif
+}
+
+#if ENABLE(TIZEN_PRERENDERING_FOR_ROTATION)
+void ewkViewRotatePrepared(Evas_Object* ewkView)
+{
+    evas_object_smart_callback_call(ewkView, "rotate,prepared", 0);
+}
+#endif
+