[Tizen] (Partial update) Reset the updated flag after calculating all damaged area...
[platform/core/uifw/dali-core.git] / dali / internal / update / render-tasks / scene-graph-camera.cpp
index 02400f3..f7b2b1c 100644 (file)
@@ -328,8 +328,8 @@ void Camera::SetReflectByPlane(const Vector4& plane)
 
 void Camera::RotateProjection(int rotationAngle)
 {
-  mProjectionRotation = rotationAngle;
-  mUpdateViewFlag     = UPDATE_COUNT;
+  mProjectionRotation   = rotationAngle;
+  mUpdateProjectionFlag = UPDATE_COUNT;
 }
 
 const Matrix& Camera::GetProjectionMatrix(BufferIndex bufferIndex) const
@@ -601,10 +601,15 @@ uint32_t Camera::UpdateProjection(BufferIndex updateBufferIndex)
   // Early-exit if no update required
   if(0u != mUpdateProjectionFlag)
   {
+    Matrix& finalProjection = mFinalProjection[updateBufferIndex];
+    finalProjection.SetIdentity();
+
     if(COPY_PREVIOUS_MATRIX == mUpdateProjectionFlag)
     {
       // The projection matrix was updated in the previous frame; copy it
       mProjectionMatrix.CopyPrevious(updateBufferIndex);
+
+      finalProjection = mFinalProjection[updateBufferIndex ? 0 : 1];
     }
     else // UPDATE_COUNT == mUpdateProjectionFlag
     {
@@ -664,9 +669,6 @@ uint32_t Camera::UpdateProjection(BufferIndex updateBufferIndex)
 
       mProjectionMatrix.SetDirty(updateBufferIndex);
 
-      Matrix& finalProjection = mFinalProjection[updateBufferIndex];
-      finalProjection.SetIdentity();
-
       Quaternion rotationAngle;
       switch(mProjectionRotation)
       {