Don't Update twice after a property setter 81/37381/6
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 25 Mar 2015 11:45:14 +0000 (11:45 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Fri, 27 Mar 2015 11:26:56 +0000 (04:26 -0700)
Change-Id: Iee6daee6ed6fe25f147744d0022f0717401ecbd1

automated-tests/src/dali/utc-Dali-RenderTask.cpp
dali/integration-api/core.h
dali/internal/update/manager/update-manager.cpp

index 8a7a3cf..0bfc035 100644 (file)
@@ -1230,17 +1230,14 @@ int UtcDaliRenderTaskContinuous01(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                     Input,    Expected  Input, Expected, KeepUpdating
-  DALI_TEST_CHECK( UpdateRender(application,  drawTrace, false,   finished, false, true ) );
-  application.GetPlatform().ClearReadyResources();
-
   DALI_TEST_CHECK( UpdateRender(application,  drawTrace, false,   finished, false, false ) );
+  application.GetPlatform().ClearReadyResources();
 
   // ADD SOURCE ACTOR TO STAGE - expect continuous renders to start, no finished signal
   Stage::GetCurrent().Add(secondRootActor);
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                  Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application,  drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application,  drawTrace, true,    finished, false, false ) );
   END_TEST;
 }
@@ -1277,17 +1274,15 @@ int UtcDaliRenderTaskContinuous02(void)
   CompleteImageLoad(application, imageRequestId, imageType); // Need to run update again for this to complete
   application.SendNotification();
 
-  // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true ) );
-  application.GetPlatform().ClearReadyResources();
+  // START PROCESS/RENDER                    Input,    Expected  Input,    Expected, KeepUpdating
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, false ) );
+  application.GetPlatform().ClearReadyResources();
 
   // MAKE SOURCE ACTOR VISIBLE - expect continuous renders to start, no finished signal
   secondRootActor.SetVisible(true);
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                 Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
   END_TEST;
 }
@@ -1321,16 +1316,14 @@ int UtcDaliRenderTaskContinuous03(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true ) );
-  application.GetPlatform().ClearReadyResources();
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, false ) );
+  application.GetPlatform().ClearReadyResources();
 
   // ADD CAMERA ACTOR TO STAGE - expect continuous renders to start, no finished signal
   Stage::GetCurrent().Add( offscreenCameraActor );
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                 Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
   END_TEST;
 }
@@ -1655,7 +1648,6 @@ int UtcDaliRenderTaskOnce05(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -1725,12 +1717,10 @@ int UtcDaliRenderTaskOnce06(void)
 
   application.SendNotification();
 
-  // Expect 2 frames to be drawn.
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
+  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
   Integration::GlSyncAbstraction::SyncObject* lastSyncObj = sync.GetLastSyncObject();
   DALI_TEST_CHECK( lastSyncObj == NULL );
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
   newTask.SetRefreshRate(RenderTask::REFRESH_ONCE);
@@ -1800,7 +1790,6 @@ int UtcDaliRenderTaskOnce07(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -2123,7 +2112,6 @@ int UtcDaliRenderTaskOnceNoSync05(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -2180,7 +2168,6 @@ int UtcDaliRenderTaskOnceNoSync06(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -2237,7 +2224,6 @@ int UtcDaliRenderTaskOnceNoSync07(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
index 91a7880..c70edef 100644 (file)
@@ -55,12 +55,11 @@ enum Reasons
 {
   NOT_REQUESTED           = 0x00, ///< Zero means that no further updates are required
   STAGE_KEEP_RENDERING    = 0x01, ///<  - Stage::KeepRendering() is being used
-  INCOMING_MESSAGES       = 0x02, ///< - Event-thread is sending messages to update-thread
-  ANIMATIONS_RUNNING      = 0x04, ///< - Animations are ongoing
-  DYNAMICS_CHANGED        = 0x08, ///< - A dynamics simulation is running
-  LOADING_RESOURCES       = 0x10, ///< - Resources are being loaded
-  MONITORING_PERFORMANCE  = 0x20, ///< - The --enable-performance-monitor option is being used
-  RENDER_TASK_SYNC        = 0x40  ///< - A render task is waiting for render sync
+  ANIMATIONS_RUNNING      = 0x02, ///< - Animations are ongoing
+  DYNAMICS_CHANGED        = 0x04, ///< - A dynamics simulation is running
+  LOADING_RESOURCES       = 0x08, ///< - Resources are being loaded
+  MONITORING_PERFORMANCE  = 0x10, ///< - The --enable-performance-monitor option is being used
+  RENDER_TASK_SYNC        = 0x20  ///< - A render task is waiting for render sync
 };
 }
 
index 94a2695..5c94fe5 100644 (file)
@@ -1191,11 +1191,6 @@ unsigned int UpdateManager::KeepUpdatingCheck( float elapsedSeconds ) const
     keepUpdatingRequest |= KeepUpdating::STAGE_KEEP_RENDERING;
   }
 
-  if ( !mImpl->messageQueue.WasEmpty() )
-  {
-    keepUpdatingRequest |= KeepUpdating::INCOMING_MESSAGES;
-  }
-
   if ( IsAnimationRunning() ||
        mImpl->animationFinishedDuringUpdate )
   {