Changed SINCE tags for new APIs introduced by New Texture 67/73067/3
authorFerran Sole <ferran.sole@samsung.com>
Mon, 6 Jun 2016 08:21:59 +0000 (09:21 +0100)
committerFerran Sole <ferran.sole@samsung.com>
Tue, 7 Jun 2016 08:19:40 +0000 (09:19 +0100)
- "SINCE" tags for new APIs introduced by patch "Added Texture object
   and FrameBuffer object to rendering API" were incorrect
- Added test cases for apis SetFrameBuffer and GetFrameBuffer in RenderTask

Change-Id: I613e86aa18613c2988295f07de74870843232f8d

automated-tests/src/dali/utc-Dali-RenderTask.cpp
dali/public-api/actors/sampling.h
dali/public-api/render-tasks/render-task.h

index 4c46196..f58b260 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali/devel-api/events/hit-test-algorithm.h>
+#include <dali/devel-api/rendering/frame-buffer.h>
 #include <dali-test-suite-utils.h>
 #include <dali/integration-api/debug.h>
 #include <test-native-image.h>
@@ -1135,6 +1136,70 @@ int UtcDaliRenderTaskGetTargetFrameBufferN(void)
   END_TEST;
 }
 
+int UtcDaliRenderTaskSetFrameBufferP(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetFrameBuffer()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+
+  FrameBuffer newFrameBuffer = FrameBuffer::New( 128u, 128u, FrameBuffer::COLOR );
+  task.SetFrameBuffer( newFrameBuffer );
+  DALI_TEST_CHECK( task.GetFrameBuffer() == newFrameBuffer );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskSetFrameBufferN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetFrameBuffer()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+  FrameBuffer newFrameBuffer; // Empty handle
+  task.SetFrameBuffer( newFrameBuffer );
+  DALI_TEST_EQUALS( (bool)task.GetFrameBuffer(), false, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetFrameBufferP(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetFrameBuffer()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+
+  FrameBuffer newFrameBuffer = FrameBuffer::New( 1u, 1u, FrameBuffer::COLOR  );
+  task.SetFrameBuffer( newFrameBuffer );
+  DALI_TEST_CHECK( task.GetFrameBuffer() == newFrameBuffer );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetFrameBufferN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetFrameBuffer()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+
+  // By default render-tasks do not render off-screen
+  FrameBuffer frameBuffer = task.GetFrameBuffer();
+  DALI_TEST_CHECK( !frameBuffer );
+
+  END_TEST;
+}
+
 int UtcDaliRenderTaskSetScreenToFrameBufferFunctionP(void)
 {
   TestApplication application;
index 669c746..72d2c9f 100644 (file)
@@ -64,7 +64,7 @@ enum Type
    * @brief Chooses the mipmap that most closely matches the size of the pixel being
    * textured and uses the GL_NEAREST criterion (the texture element closest to
    * the specified texture coordinates) to produce a texture value.
-   * @SINCE_1_1.37
+   * @SINCE_1_1.38
    */
   NEAREST_MIPMAP_NEAREST,
 
@@ -72,7 +72,7 @@ enum Type
    * @brief Chooses the mipmap that most closely matches the size of the pixel being textured
    * and uses the GL_LINEAR criterion (a weighted average of the four texture elements
    * that are closest to the specified texture coordinates) to produce a texture value.
-   * @SINCE_1_1.37
+   * @SINCE_1_1.38
    */
   LINEAR_MIPMAP_NEAREST,
 
@@ -81,7 +81,7 @@ enum Type
    * and uses the GL_NEAREST criterion (the texture element closest to the specified texture
    * coordinates ) to produce a texture value from each mipmap. The final texture value is a
    * weighted average of those two values.
-   * @SINCE_1_1.37
+   * @SINCE_1_1.38
    */
   NEAREST_MIPMAP_LINEAR,
 
@@ -90,7 +90,7 @@ enum Type
    * uses the GL_LINEAR criterion (a weighted average of the texture elements that are closest
    * to the specified texture coordinates) to produce a texture value from each mipmap. The final
    * texture value is a weighted average of those two values.
-   * @SINCE_1_1.37
+   * @SINCE_1_1.38
    */
   LINEAR_MIPMAP_LINEAR
 
index dd04880..84f4525 100644 (file)
@@ -296,14 +296,14 @@ public:
 
   /**
    * @brief Set the frame-buffer used as a render target.
-   * @SINCE_1_1.37
+   * @SINCE_1_1.38
    * @param[in] frameBuffer er A valid FrameBuffer handle to enable off-screen rendering, or an uninitialized handle to disable it.
    */
   void SetFrameBuffer( FrameBuffer frameBuffer );
 
   /**
    * @brief Retrieve the frame-buffer used as a render target.
-   * @SINCE_1_1.37
+   * @SINCE_1_1.38
    * @return The framebuffer
    */
   FrameBuffer GetFrameBuffer() const;