Renamed enum Geometry::GeometryType to Geometry::Type 71/81671/2
authorFerran Sole <ferran.sole@samsung.com>
Wed, 27 Jul 2016 16:13:10 +0000 (17:13 +0100)
committerFerran Sole <ferran.sole@samsung.com>
Thu, 28 Jul 2016 09:28:31 +0000 (10:28 +0100)
* Renamed GeometryType enum to Type
* Renamed Geometry::SetGeometryType and Geometry::GetGeometryType to Geometry::SetType and Geometry::GetType

Change-Id: Ifcfe881ad4d9a5fa0b6750658dbea9509a6bdc57

automated-tests/src/dali/utc-Dali-Geometry.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
dali/internal/event/actors/image-actor-impl.cpp
dali/internal/event/rendering/geometry-impl.cpp
dali/internal/event/rendering/geometry-impl.h
dali/internal/render/common/render-manager.cpp
dali/internal/render/renderers/render-geometry.h
dali/public-api/rendering/geometry.cpp
dali/public-api/rendering/geometry.h
dali/public-api/rendering/shader.h

index 0bb9aa3..2edfd8e 100644 (file)
@@ -303,7 +303,7 @@ int UtcDaliGeometrySetGetGeometryType01(void)
 {
   TestApplication application;
 
-  tet_infoline("Test SetGeometryType and GetGeometryType: without index buffer");
+  tet_infoline("Test SetType and GetType: without index buffer");
 
   unsigned int numVertex = 4u;
   PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
@@ -338,11 +338,11 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   out << GL_TRIANGLES << ", " << 0 << ", " << numVertex;
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawArrays", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::TRIANGLES, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::TRIANGLES, TEST_LOCATION);
 
   /*********************************************************/
   // LINES, no index buffer
-  geometry.SetGeometryType( Geometry::LINES );
+  geometry.SetType( Geometry::LINES );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -359,11 +359,11 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   out << GL_LINES << ", " << 0 << ", " << numVertex;
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawArrays", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::LINES, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::LINES, TEST_LOCATION);
 
   /*****************************************************/
   //POINTS
-  geometry.SetGeometryType( Geometry::POINTS );
+  geometry.SetType( Geometry::POINTS );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -380,11 +380,11 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   out << GL_POINTS << ", " << 0 << ", " << numVertex;
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawArrays", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::POINTS, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::POINTS, TEST_LOCATION);
 
   /*****************************************************/
   //TRIANGLE_STRIP, no index buffer
-  geometry.SetGeometryType( Geometry::TRIANGLE_STRIP );
+  geometry.SetType( Geometry::TRIANGLE_STRIP );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -401,11 +401,11 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   out << GL_TRIANGLE_STRIP << ", " << 0 << ", " << numVertex;
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawArrays", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::TRIANGLE_STRIP, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::TRIANGLE_STRIP, TEST_LOCATION);
 
   /*****************************************************/
   //TRIANGLE_FAN, no index buffer
-  geometry.SetGeometryType( Geometry::TRIANGLE_FAN );
+  geometry.SetType( Geometry::TRIANGLE_FAN );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -422,7 +422,7 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   out << GL_TRIANGLE_FAN << ", " << 0 << ", " << numVertex;
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawArrays", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::TRIANGLE_FAN, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::TRIANGLE_FAN, TEST_LOCATION);
 
   END_TEST;
 }
@@ -431,7 +431,7 @@ int UtcDaliGeometrySetGetGeometryType02(void)
 {
   TestApplication application;
 
-  tet_infoline("Test SetGeometryType and GetGeometryType: with index buffer");
+  tet_infoline("Test SetType and GetType: with index buffer");
 
   unsigned int numVertex = 4u;
   unsigned int numIndex = 6u; // 6 unsigned short
@@ -469,11 +469,11 @@ int UtcDaliGeometrySetGetGeometryType02(void)
   out << GL_TRIANGLES << ", " << numIndex << ", " << GL_UNSIGNED_SHORT<<", "<<"indices";
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawElements", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::TRIANGLES, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::TRIANGLES, TEST_LOCATION);
 
   /*********************************************************/
   // LINES, with index buffer
-  geometry.SetGeometryType( Geometry::LINES );
+  geometry.SetType( Geometry::LINES );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -489,11 +489,11 @@ int UtcDaliGeometrySetGetGeometryType02(void)
   out << GL_LINES << ", " << numIndex << ", " << GL_UNSIGNED_SHORT<<", "<<"indices";
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawElements", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::LINES, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::LINES, TEST_LOCATION);
 
   /*****************************************************/
   //POINTS
-  geometry.SetGeometryType( Geometry::POINTS );
+  geometry.SetType( Geometry::POINTS );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -510,11 +510,11 @@ int UtcDaliGeometrySetGetGeometryType02(void)
   out << GL_POINTS << ", " << 0 << ", " << numVertex;
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawArrays", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::POINTS, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::POINTS, TEST_LOCATION);
 
   /*****************************************************/
   //TRIANGLE_STRIP
-  geometry.SetGeometryType( Geometry::TRIANGLE_STRIP );
+  geometry.SetType( Geometry::TRIANGLE_STRIP );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -530,11 +530,11 @@ int UtcDaliGeometrySetGetGeometryType02(void)
   out << GL_TRIANGLE_STRIP << ", " << numIndex << ", " << GL_UNSIGNED_SHORT<<", "<<"indices";
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawElements", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::TRIANGLE_STRIP, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::TRIANGLE_STRIP, TEST_LOCATION);
 
   /*****************************************************/
   //TRIANGLE_FAN
-  geometry.SetGeometryType( Geometry::TRIANGLE_FAN );
+  geometry.SetType( Geometry::TRIANGLE_FAN );
 
   drawTrace.Reset();
   drawTrace.Enable(true);
@@ -550,7 +550,7 @@ int UtcDaliGeometrySetGetGeometryType02(void)
   out << GL_TRIANGLE_FAN << ", " << numIndex << ", " << GL_UNSIGNED_SHORT<<", "<<"indices";
   DALI_TEST_EQUALS( drawTrace.TestMethodAndParams(1, "DrawElements", out.str()), true, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( geometry.GetGeometryType(), Geometry::TRIANGLE_FAN, TEST_LOCATION);
+  DALI_TEST_EQUALS( geometry.GetType(), Geometry::TRIANGLE_FAN, TEST_LOCATION);
 
   END_TEST;
 }
index d07b473..a812941 100644 (file)
@@ -1802,7 +1802,7 @@ int UtcDaliRendererSetIndexRange(void)
 
   // create geometry
   Geometry geometry = Geometry::New();
-  geometry.SetGeometryType( Geometry::LINE_LOOP );
+  geometry.SetType( Geometry::LINE_LOOP );
 
   // --------------------------------------------------------------------------
   // index buffer
@@ -1867,7 +1867,7 @@ int UtcDaliRendererSetIndexRange(void)
   // LINE_STRIP, first 15, count 6
   {
     renderer.SetIndexRange( 15, 6 );
-    geometry.SetGeometryType( Geometry::LINE_STRIP );
+    geometry.SetType( Geometry::LINE_STRIP );
     sprintf( buffer, "%u, 6, %u, indices", GL_LINE_STRIP, GL_UNSIGNED_SHORT );
     application.SendNotification();
     application.Render();
@@ -1878,7 +1878,7 @@ int UtcDaliRendererSetIndexRange(void)
   // Index out of bounds
   {
     renderer.SetIndexRange( 15, 30 );
-    geometry.SetGeometryType( Geometry::LINE_STRIP );
+    geometry.SetType( Geometry::LINE_STRIP );
     sprintf( buffer, "%u, 6, %u, indices", GL_LINE_STRIP, GL_UNSIGNED_SHORT );
     application.SendNotification();
     application.Render();
@@ -1889,7 +1889,7 @@ int UtcDaliRendererSetIndexRange(void)
   // drawing whole buffer starting from 15 ( last valid primitive )
   {
     renderer.SetIndexRange( 15, 0 );
-    geometry.SetGeometryType( Geometry::LINE_STRIP );
+    geometry.SetType( Geometry::LINE_STRIP );
     sprintf( buffer, "%u, 6, %u, indices", GL_LINE_STRIP, GL_UNSIGNED_SHORT );
     application.SendNotification();
     application.Render();
index 4bdff0e..93d1ab4 100644 (file)
@@ -128,7 +128,7 @@ GeometryPtr CreateGeometry( unsigned int gridWidth, unsigned int gridHeight, con
   {
     geometry->SetIndexBuffer( &indices[0], indices.Size() );
   }
-  geometry->SetGeometryType( Dali::Geometry::TRIANGLE_STRIP );
+  geometry->SetType( Dali::Geometry::TRIANGLE_STRIP );
 
   return geometry;
 }
index 281ca92..6c8bf92 100644 (file)
@@ -68,19 +68,19 @@ void Geometry::SetIndexBuffer( const unsigned short* indices, size_t count )
   SceneGraph::SetIndexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, indexData );
 }
 
-void Geometry::SetGeometryType( Dali::Geometry::GeometryType geometryType )
+void Geometry::SetType( Dali::Geometry::Type geometryType )
 {
-  if( geometryType != mGeometryType )
+  if( geometryType != mType )
   {
     SceneGraph::SetGeometryTypeMessage(mEventThreadServices.GetUpdateManager(), *mRenderObject, geometryType );
 
-    mGeometryType = geometryType;
+    mType = geometryType;
   }
 }
 
-Dali::Geometry::GeometryType Geometry::GetGeometryType() const
+Dali::Geometry::Type Geometry::GetType() const
 {
-  return mGeometryType;
+  return mType;
 }
 
 const Render::Geometry* Geometry::GetRenderObject() const
@@ -91,7 +91,7 @@ const Render::Geometry* Geometry::GetRenderObject() const
 Geometry::Geometry()
 : mEventThreadServices( *Stage::GetCurrent() ),
   mRenderObject( NULL ),
-  mGeometryType(Dali::Geometry::TRIANGLES)
+  mType(Dali::Geometry::TRIANGLES)
 {
 }
 
index 9738377..8a1f90a 100644 (file)
@@ -78,14 +78,14 @@ public:
   void SetIndexBuffer( const unsigned short* indices, size_t count );
 
   /**
-   * @copydoc Dali::Geometry::SetGeometryType()
+   * @copydoc Dali::Geometry::SetType()
    */
-  void SetGeometryType( Dali::Geometry::GeometryType geometryType );
+  void SetType( Dali::Geometry::Type geometryType );
 
   /**
-   * @copydoc Dali::Geometry::GetGeometryType()
+   * @copydoc Dali::Geometry::GetType()
    */
-  Dali::Geometry::GeometryType GetGeometryType() const;
+  Dali::Geometry::Type GetType() const;
 
   /**
    * @brief Get the geometry scene object
@@ -123,7 +123,7 @@ private: // data
   Render::Geometry* mRenderObject;
 
   std::vector<PropertyBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
-  Dali::Geometry::GeometryType mGeometryType;      ///< Geometry type (cached)
+  Dali::Geometry::Type mType;      ///< Geometry type (cached)
 };
 
 } // namespace Internal
index 85af820..a4281eb 100644 (file)
@@ -484,7 +484,7 @@ void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::Prop
 
 void RenderManager::SetGeometryType( Render::Geometry* geometry, unsigned int geometryType )
 {
-  geometry->SetGeometryType( Render::Geometry::GeometryType(geometryType) );
+  geometry->SetType( Render::Geometry::Type(geometryType) );
 }
 
 void RenderManager::AddRenderTracker( Render::RenderTracker* renderTracker )
index f7c7a43..205e0f1 100644 (file)
@@ -46,7 +46,7 @@ class PropertyBuffer;
 class Geometry
 {
 public:
-  typedef Dali::Geometry::GeometryType GeometryType;
+  typedef Dali::Geometry::Type Type;
 
   Geometry();
 
@@ -109,7 +109,7 @@ public:
    * Sets the geometry type
    * @param[in] type The new geometry type
    */
-  void SetGeometryType( GeometryType type )
+  void SetType( Type type )
   {
     mGeometryType = type;
   }
@@ -136,7 +136,7 @@ private:
 
   Dali::Vector< unsigned short> mIndices;
   OwnerPointer< GpuBuffer > mIndexBuffer;
-  GeometryType mGeometryType;
+  Type mGeometryType;
 
   // Booleans
   bool mIndicesChanged : 1;
index 22f0793..43dfb0d 100644 (file)
@@ -75,14 +75,14 @@ void Geometry::SetIndexBuffer( const unsigned short* indices, size_t count )
   GetImplementation(*this).SetIndexBuffer( indices, count );
 }
 
-void Geometry::SetGeometryType( GeometryType geometryType )
+void Geometry::SetType( Type geometryType )
 {
-  GetImplementation(*this).SetGeometryType( geometryType );
+  GetImplementation(*this).SetType( geometryType );
 }
 
-Geometry::GeometryType Geometry::GetGeometryType() const
+Geometry::Type Geometry::GetType() const
 {
-  return GetImplementation(*this).GetGeometryType();
+  return GetImplementation(*this).GetType();
 }
 
 Geometry::Geometry( Internal::Geometry* pointer )
index 14ecb11..2c9780b 100644 (file)
@@ -45,17 +45,17 @@ public:
 
   /**
    * @brief Describes the type of geometry, used to determine how the coordinates will be used.
-   * @SINCE_1_1.43
+   * @SINCE_1_1.45
    */
-  enum GeometryType
+  enum Type
   {
-    POINTS,        ///< Individual points                                                                                          @SINCE_1_1.43
-    LINES,         ///< Individual lines (made of 2 points each)                                                                   @SINCE_1_1.43
-    LINE_LOOP,     ///< A strip of lines (made of 1 point each) which also joins the first and last point                          @SINCE_1_1.43
-    LINE_STRIP,    ///< A strip of lines (made of 1 point each)                                                                    @SINCE_1_1.43
-    TRIANGLES,     ///< Individual triangles (made of 3 points each)                                                               @SINCE_1_1.43
-    TRIANGLE_FAN,  ///< A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point) @SINCE_1_1.43
-    TRIANGLE_STRIP ///< A strip of triangles (after the first triangle, following triangles need only 1 point)                     @SINCE_1_1.43
+    POINTS,        ///< Individual points                                                                                          @SINCE_1_1.45
+    LINES,         ///< Individual lines (made of 2 points each)                                                                   @SINCE_1_1.45
+    LINE_LOOP,     ///< A strip of lines (made of 1 point each) which also joins the first and last point                          @SINCE_1_1.45
+    LINE_STRIP,    ///< A strip of lines (made of 1 point each)                                                                    @SINCE_1_1.45
+    TRIANGLES,     ///< Individual triangles (made of 3 points each)                                                               @SINCE_1_1.45
+    TRIANGLE_FAN,  ///< A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point) @SINCE_1_1.45
+    TRIANGLE_STRIP ///< A strip of triangles (after the first triangle, following triangles need only 1 point)                     @SINCE_1_1.45
   };
 
 
@@ -152,7 +152,7 @@ public:
    * @SINCE_1_1.43
    * @param[in] geometryType Type of primitives this geometry contains
    */
-  void SetGeometryType( GeometryType geometryType );
+  void SetType( Type geometryType );
 
   /**
    * @brief Get the type of primitives this geometry contains
@@ -161,7 +161,7 @@ public:
    * @SINCE_1_1.43
    * @return Type of primitives this geometry contains
    */
-  GeometryType GetGeometryType() const;
+  Type GetType() const;
 
 public:
 
index a85bece..7962ec3 100644 (file)
@@ -80,9 +80,9 @@ public:
   {
     enum Value
     {
-      NONE                     = 0x00, ///< No hints                                                                          @SINCE_1_1.43
-      OUTPUT_IS_TRANSPARENT    = 0x01, ///< Might generate transparent alpha from opaque inputs                               @SINCE_1_1.43
-      MODIFIES_GEOMETRY        = 0x02, ///< Might change position of vertices, this option disables any culling optimizations @SINCE_1_1.43
+      NONE                     = 0x00, ///< No hints                                                                          @SINCE_1_1.45
+      OUTPUT_IS_TRANSPARENT    = 0x01, ///< Might generate transparent alpha from opaque inputs                               @SINCE_1_1.45
+      MODIFIES_GEOMETRY        = 0x02, ///< Might change position of vertices, this option disables any culling optimizations @SINCE_1_1.45
     };
   };