[Tizen] Temporarily revert CameraActor behavior on zero size initialization submit/tizen/20190902.071821 submit/tizen/20190902.073646
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 2 Sep 2019 06:58:20 +0000 (15:58 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Mon, 2 Sep 2019 06:58:24 +0000 (15:58 +0900)
This reverts commit 1cd273551b5a3247a2a1d6f5d9b195f2bcd1dbba.

Change-Id: I47cf5b6527958c29e321bf4e818bb8cd37360a89

dali/internal/event/actors/camera-actor-impl.cpp

index 715781e..2afd2eb 100644 (file)
@@ -372,16 +372,16 @@ bool CameraActor::GetInvertYAxis() const
 
 void CameraActor::SetPerspectiveProjection( const Size& size )
 {
+  float width = size.width;
+  float height = size.height;
+
   if( ( size.width < Math::MACHINE_EPSILON_1000 ) || ( size.height < Math::MACHINE_EPSILON_1000 ) )
   {
-    // Not allowed to set the canvas size to be 0.
-    DALI_LOG_ERROR( "Canvas size can not be 0\n" );
-    return;
+    Size stageSize = Dali::Stage::GetCurrent().GetSize();
+    width = stageSize.width;
+    height = stageSize.height;
   }
 
-  float width = size.width;
-  float height = size.height;
-
   float nearClippingPlane;
   float farClippingPlane;
   float cameraZ;