[Tizen] Temporarily revert CameraActor behavior on zero size initialization 91/213091/2
authorJiyun Yang <ji.yang@samsung.com>
Fri, 30 Aug 2019 07:39:07 +0000 (16:39 +0900)
committerJIYUN YANG <ji.yang@samsung.com>
Mon, 2 Sep 2019 06:36:36 +0000 (06:36 +0000)
Change-Id: I17de867025a46cc728b650ef0fd6a5bcda6ba712
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
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;