#include <stdlib.h>
#include <dali/public-api/dali-core.h>
+#include <dali/devel-api/events/hit-test-algorithm.h>
#include <dali-test-suite-utils.h>
#include <dali/integration-api/debug.h>
#include <test-native-image.h>
Vector2 newPosition3(64.0f, 0.0f);
Animation animation = Animation::New(1.0f);
- animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition3, AlphaFunctions::Linear );
+ animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition3, AlphaFunction::LINEAR );
animation.Play();
// Perform 1000ms worth of updates at which point animation should have completed.
Vector2 newSize3(10.0f, 10.0f);
Animation animation = Animation::New(1.0f);
- animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_SIZE ), newSize3, AlphaFunctions::Linear );
+ animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_SIZE ), newSize3, AlphaFunction::LINEAR );
animation.Play();
// Perform 1000ms worth of updates at which point animation should have completed.
Property::IndexContainer indices;
task.GetPropertyIndices( indices );
- DALI_TEST_CHECK( ! indices.empty() );
- DALI_TEST_EQUALS( indices.size(), task.GetPropertyCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( indices.Size() );
+ DALI_TEST_EQUALS( indices.Size(), task.GetPropertyCount(), TEST_LOCATION );
END_TEST;
}
END_TEST;
}
+
+int UtcDaliRenderTaskFinishMissingImage(void)
+{
+ TestApplication application;
+
+ // Previously we had bugs where not having a resource ID would cause render-tasks to wait forever
+ tet_infoline("Testing RenderTask::SignalFinished() when an ImageActor has no Image set");
+
+ Stage stage = Stage::GetCurrent();
+
+ BufferImage image = BufferImage::New( 10, 10 );
+ ImageActor rootActor = ImageActor::New( image );
+ rootActor.SetSize( 10, 10 );
+ stage.Add( rootActor );
+
+ ImageActor actorWithMissingImage = ImageActor::New( Image() );
+ actorWithMissingImage.SetSize( 10, 10 );
+ stage.Add( actorWithMissingImage );
+
+ RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+ RenderTask newTask = taskList.CreateTask();
+ newTask.SetInputEnabled( false );
+ newTask.SetClearColor( Vector4( 0.f, 0.f, 0.f, 0.f ) );
+ newTask.SetClearEnabled( true );
+ newTask.SetExclusive( true );
+ newTask.SetRefreshRate( RenderTask::REFRESH_ONCE );
+
+ bool finished = false;
+ RenderTaskFinished renderTaskFinished( finished );
+ newTask.FinishedSignal().Connect( &application, renderTaskFinished );
+
+ // 1 render to process render task, then 1 before finished msg is sent from update to the event thread.
+ application.SendNotification();
+ application.Render();
+ application.Render();
+
+ application.SendNotification();
+ DALI_TEST_CHECK( finished );
+
+ END_TEST;
+}