Renaming PropertyBuffer to VertexBuffer 76/242176/3
authorDavid Steele <david.steele@samsung.com>
Mon, 24 Aug 2020 15:08:50 +0000 (16:08 +0100)
committerDavid Steele <david.steele@samsung.com>
Tue, 25 Aug 2020 16:19:28 +0000 (17:19 +0100)
Change-Id: I1d00165182d979795629c900400c236c49db3027

33 files changed:
automated-tests/src/dali/CMakeLists.txt
automated-tests/src/dali/dali-test-suite-utils/mesh-builder.cpp
automated-tests/src/dali/dali-test-suite-utils/mesh-builder.h
automated-tests/src/dali/utc-Dali-Geometry.cpp
automated-tests/src/dali/utc-Dali-MeshMaterial.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
automated-tests/src/dali/utc-Dali-VertexBuffer.cpp [moved from automated-tests/src/dali/utc-Dali-PropertyBuffer.cpp with 65% similarity]
dali/integration-api/profiling.cpp
dali/internal/event/rendering/geometry-impl.cpp
dali/internal/event/rendering/geometry-impl.h
dali/internal/event/rendering/texture-set-impl.h
dali/internal/event/rendering/vertex-buffer-impl.cpp [moved from dali/internal/event/common/property-buffer-impl.cpp with 85% similarity]
dali/internal/event/rendering/vertex-buffer-impl.h [moved from dali/internal/event/common/property-buffer-impl.h with 70% similarity]
dali/internal/file.list
dali/internal/render/common/render-manager.cpp
dali/internal/render/common/render-manager.h
dali/internal/render/data-providers/property-buffer-data-provider.h [deleted file]
dali/internal/render/data-providers/render-data-provider.h
dali/internal/render/renderers/render-geometry.cpp
dali/internal/render/renderers/render-geometry.h
dali/internal/render/renderers/render-vertex-buffer.cpp [moved from dali/internal/render/renderers/render-property-buffer.cpp with 85% similarity]
dali/internal/render/renderers/render-vertex-buffer.h [moved from dali/internal/render/renderers/render-property-buffer.h with 86% similarity]
dali/internal/update/controllers/render-message-dispatcher.h
dali/internal/update/manager/render-instruction-processor.cpp
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/public-api/dali-core.h
dali/public-api/file.list
dali/public-api/rendering/geometry.cpp
dali/public-api/rendering/geometry.h
dali/public-api/rendering/property-buffer.cpp [deleted file]
dali/public-api/rendering/vertex-buffer.cpp [new file with mode: 0644]
dali/public-api/rendering/vertex-buffer.h [moved from dali/public-api/rendering/property-buffer.h with 75% similarity]

index fb41a62..30fffe6 100644 (file)
@@ -61,7 +61,6 @@ SET(TC_SOURCES
         utc-Dali-PixelData.cpp
         utc-Dali-Processors.cpp
         utc-Dali-PropertyArray.cpp
-        utc-Dali-PropertyBuffer.cpp
         utc-Dali-PropertyMap.cpp
         utc-Dali-PropertyNotification.cpp
         utc-Dali-PropertyTypes.cpp
@@ -101,6 +100,7 @@ SET(TC_SOURCES
         utc-Dali-Vector2.cpp
         utc-Dali-Vector3.cpp
         utc-Dali-Vector4.cpp
+        utc-Dali-VertexBuffer.cpp
         utc-Dali-WeakHandle.cpp
         utc-Dali-WheelEvent.cpp
 )
index 2e8f724..3d7c359 100644 (file)
@@ -38,19 +38,19 @@ TextureSet CreateTextureSet( Texture texture )
   return textureSet;
 }
 
-PropertyBuffer CreatePropertyBuffer()
+VertexBuffer CreateVertexBuffer()
 {
   Property::Map texturedQuadVertexFormat;
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer vertexData = PropertyBuffer::New( texturedQuadVertexFormat );
+  VertexBuffer vertexData = VertexBuffer::New( texturedQuadVertexFormat );
   return vertexData;
 }
 
 Geometry CreateQuadGeometry(void)
 {
-  PropertyBuffer vertexData = CreatePropertyBuffer();
+  VertexBuffer vertexData = CreateVertexBuffer();
   const float halfQuadSize = .5f;
   struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
   TexturedQuadVertex texturedQuadVertexData[4] = {
index 37d13ec..e593d38 100644 (file)
@@ -28,7 +28,7 @@ Shader CreateShader();
 TextureSet CreateTextureSet();
 TextureSet CreateTextureSet( Texture texture );
 Geometry CreateQuadGeometry();
-PropertyBuffer CreatePropertyBuffer();
+VertexBuffer CreateVertexBuffer();
 
 }
 
index 7fe2e63..dbbb0f8 100644 (file)
@@ -37,7 +37,7 @@ namespace
 
 struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
 
-PropertyBuffer CreateVertexBuffer( const std::string& aPosition, const std::string& aTexCoord )
+VertexBuffer CreateVertexBuffer( const std::string& aPosition, const std::string& aTexCoord )
 {
   const float halfQuadSize = .5f;
   TexturedQuadVertex texturedQuadVertexData[4] = {
@@ -50,7 +50,7 @@ PropertyBuffer CreateVertexBuffer( const std::string& aPosition, const std::stri
   vertexFormat[aPosition] = Property::VECTOR2;
   vertexFormat[aTexCoord] = Property::VECTOR2;
 
-  PropertyBuffer vertexData = PropertyBuffer::New( vertexFormat );
+  VertexBuffer vertexData = VertexBuffer::New( vertexFormat );
   vertexData.SetData( texturedQuadVertexData, 4 );
 
   return vertexData;
@@ -114,7 +114,7 @@ int UtcDaliGeometryMoveConstructor(void)
   DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
   geometry.AddVertexBuffer( vertexBuffer );
   DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
@@ -136,7 +136,7 @@ int UtcDaliGeometryMoveAssignment(void)
   DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
   geometry.AddVertexBuffer( vertexBuffer );
   DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
@@ -178,7 +178,7 @@ int UtcDaliGeometryAddVertexBuffer(void)
 
   tet_infoline("Test AddVertexBuffer");
 
-  PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+  VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer1 );
 
@@ -206,7 +206,7 @@ int UtcDaliGeometryAddVertexBuffer(void)
   // add the second vertex buffer
   application.GetGlAbstraction().ResetBufferDataCalls();
 
-  PropertyBuffer vertexBuffer2 = CreateVertexBuffer( "aPosition2", "aTexCoord2" );
+  VertexBuffer vertexBuffer2 = CreateVertexBuffer( "aPosition2", "aTexCoord2" );
   geometry.AddVertexBuffer( vertexBuffer2 );
   application.SendNotification();
   application.Render(0);
@@ -230,9 +230,9 @@ int UtcDaliGeometryGetNumberOfVertexBuffers(void)
   TestApplication application;
 
   tet_infoline("Test GetNumberOfVertexBuffers");
-  PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
-  PropertyBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
-  PropertyBuffer vertexBuffer3 = CreateVertexBuffer("aPosition3", "aTexCoord3" );
+  VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+  VertexBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
+  VertexBuffer vertexBuffer3 = CreateVertexBuffer("aPosition3", "aTexCoord3" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer1 );
@@ -254,8 +254,8 @@ int UtcDaliGeometryRemoveVertexBuffer(void)
 
   tet_infoline("Test RemoveVertexBuffer");
 
-  PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
-  PropertyBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
+  VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+  VertexBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer1 );
@@ -288,7 +288,7 @@ int UtcDaliGeometrySetIndexBuffer(void)
 
   tet_infoline("Test SetIndexBuffer");
 
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer );
@@ -346,7 +346,7 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   tet_infoline("Test SetType and GetType: without index buffer");
 
   unsigned int numVertex = 4u;
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer );
@@ -475,7 +475,7 @@ int UtcDaliGeometrySetGetGeometryType02(void)
 
   unsigned int numVertex = 4u;
   unsigned int numIndex = 6u; // 6 unsigned short
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
 
 
   Geometry geometry = Geometry::New();
@@ -619,7 +619,7 @@ int UtcDaliGeometryAddVertexBufferNegative(void)
   Dali::Geometry instance;
   try
   {
-    Dali::PropertyBuffer arg1;
+    Dali::VertexBuffer arg1;
     instance.AddVertexBuffer(arg1);
     DALI_TEST_CHECK(false); // Should not get here
   }
index fc696f5..e453dbd 100644 (file)
@@ -77,10 +77,8 @@ void mesh_material_test_cleanup(void)
  *
  * Check rendered vertex buffer is the right size for the initial property buffer
  *
- * Check PropertyBuffer set via SetData can be read thru property system
- * Check PropertyBuffer property setters / getters
- * Check vertex PropertyBuffer set via properties renders as expected
- * Check Index propertyBuffer set via properties renders as expected
+ * Check VertexBuffer set via SetData renders as expected
+ * Check IndexBuffer set via properties renders as expected
  *
  * Check geometry type renders correctly as the matching GL draw call and type
  *
index 3430f45..7b700ce 100644 (file)
@@ -2028,7 +2028,7 @@ int UtcDaliRendererSetIndexRange(void)
   };
   Property::Map vertexFormat;
   vertexFormat["aPosition"] = Property::VECTOR2;
-  PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat );
   vertexBuffer.SetData( shapes, sizeof(shapes)/sizeof(shapes[0]));
 
   // --------------------------------------------------------------------------
@@ -22,17 +22,17 @@ using namespace Dali;
 
 #include <mesh-builder.h>
 
-void propertyBuffer_test_startup(void)
+void vertexBuffer_test_startup(void)
 {
   test_return_value = TET_UNDEF;
 }
 
-void propertyBuffer_test_cleanup(void)
+void vertexBuffer_test_cleanup(void)
 {
   test_return_value = TET_PASS;
 }
 
-int UtcDaliPropertyBufferNew01(void)
+int UtcDaliVertexBufferNew01(void)
 {
   TestApplication application;
 
@@ -40,21 +40,21 @@ int UtcDaliPropertyBufferNew01(void)
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
 
-  DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferNew02(void)
+int UtcDaliVertexBufferNew02(void)
 {
   TestApplication application;
-  PropertyBuffer propertyBuffer;
-  DALI_TEST_EQUALS( (bool)propertyBuffer, false, TEST_LOCATION );
+  VertexBuffer vertexBuffer;
+  DALI_TEST_EQUALS( (bool)vertexBuffer, false, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferDownCast01(void)
+int UtcDaliVertexBufferDownCast01(void)
 {
   TestApplication application;
 
@@ -62,92 +62,92 @@ int UtcDaliPropertyBufferDownCast01(void)
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
 
-  BaseHandle handle(propertyBuffer);
-  PropertyBuffer propertyBuffer2 = PropertyBuffer::DownCast(handle);
-  DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
+  BaseHandle handle(vertexBuffer);
+  VertexBuffer vertexBuffer2 = VertexBuffer::DownCast(handle);
+  DALI_TEST_EQUALS( (bool)vertexBuffer2, true, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferDownCast02(void)
+int UtcDaliVertexBufferDownCast02(void)
 {
   TestApplication application;
 
   Handle handle = Handle::New(); // Create a custom object
-  PropertyBuffer propertyBuffer = PropertyBuffer::DownCast(handle);
-  DALI_TEST_EQUALS( (bool)propertyBuffer, false, TEST_LOCATION );
+  VertexBuffer vertexBuffer = VertexBuffer::DownCast(handle);
+  DALI_TEST_EQUALS( (bool)vertexBuffer, false, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferCopyConstructor(void)
+int UtcDaliVertexBufferCopyConstructor(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
 
-  PropertyBuffer propertyBufferCopy(propertyBuffer);
+  VertexBuffer vertexBufferCopy(vertexBuffer);
 
-  DALI_TEST_EQUALS( (bool)propertyBufferCopy, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( propertyBufferCopy.GetSize(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( (bool)vertexBufferCopy, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( vertexBufferCopy.GetSize(), 0u, TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferAssignmentOperator(void)
+int UtcDaliVertexBufferAssignmentOperator(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
 
-  PropertyBuffer propertyBuffer2;
-  DALI_TEST_EQUALS( (bool)propertyBuffer2, false, TEST_LOCATION );
+  VertexBuffer vertexBuffer2;
+  DALI_TEST_EQUALS( (bool)vertexBuffer2, false, TEST_LOCATION );
 
-  propertyBuffer2 = propertyBuffer;
-  DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( propertyBuffer2.GetSize(), 0u, TEST_LOCATION );
+  vertexBuffer2 = vertexBuffer;
+  DALI_TEST_EQUALS( (bool)vertexBuffer2, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( vertexBuffer2.GetSize(), 0u, TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferMoveConstructor(void)
+int UtcDaliVertexBufferMoveConstructor(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
-  DALI_TEST_CHECK( propertyBuffer );
-  DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
+  DALI_TEST_CHECK( vertexBuffer );
+  DALI_TEST_EQUALS( 1, vertexBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, vertexBuffer.GetSize(), TEST_LOCATION );
 
-  PropertyBuffer move = std::move( propertyBuffer );
+  VertexBuffer move = std::move( vertexBuffer );
   DALI_TEST_CHECK( move );
   DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
-  DALI_TEST_CHECK( !propertyBuffer );
+  DALI_TEST_CHECK( !vertexBuffer );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferMoveAssignment(void)
+int UtcDaliVertexBufferMoveAssignment(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
-  DALI_TEST_CHECK( propertyBuffer );
-  DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
+  DALI_TEST_CHECK( vertexBuffer );
+  DALI_TEST_EQUALS( 1, vertexBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, vertexBuffer.GetSize(), TEST_LOCATION );
 
-  PropertyBuffer move;
-  move = std::move( propertyBuffer );
+  VertexBuffer move;
+  move = std::move( vertexBuffer );
   DALI_TEST_CHECK( move );
   DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
-  DALI_TEST_CHECK( !propertyBuffer );
+  DALI_TEST_CHECK( !vertexBuffer );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferSetData01(void)
+int UtcDaliVertexBufferSetData01(void)
 {
   TestApplication application;
 
@@ -156,8 +156,8 @@ int UtcDaliPropertyBufferSetData01(void)
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
   {
-    PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
-    DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+    VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
+    DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
 
     const float halfQuadSize = .5f;
     struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
@@ -167,10 +167,10 @@ int UtcDaliPropertyBufferSetData01(void)
       { Vector2(-halfQuadSize,  halfQuadSize), Vector2(0.f, 1.f) },
       { Vector2( halfQuadSize,  halfQuadSize), Vector2(1.f, 1.f) } };
 
-    propertyBuffer.SetData( texturedQuadVertexData, 4 );
+    vertexBuffer.SetData( texturedQuadVertexData, 4 );
 
     Geometry geometry = Geometry::New();
-    geometry.AddVertexBuffer( propertyBuffer );
+    geometry.AddVertexBuffer( vertexBuffer );
 
     Shader shader = CreateShader();
     Renderer renderer = Renderer::New(geometry, shader);
@@ -199,7 +199,7 @@ int UtcDaliPropertyBufferSetData01(void)
   END_TEST;
 }
 
-int UtcDaliPropertyBufferSetData02(void)
+int UtcDaliVertexBufferSetData02(void)
 {
   TestApplication application;
 
@@ -207,8 +207,8 @@ int UtcDaliPropertyBufferSetData02(void)
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
-  DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+  VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
+  DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
 
   const float halfQuadSize = .5f;
   struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
@@ -218,10 +218,10 @@ int UtcDaliPropertyBufferSetData02(void)
     { Vector2(-halfQuadSize,  halfQuadSize), Vector2(0.f, 1.f) },
     { Vector2( halfQuadSize,  halfQuadSize), Vector2(1.f, 1.f) } };
 
-  propertyBuffer.SetData( texturedQuadVertexData, 4 );
+  vertexBuffer.SetData( texturedQuadVertexData, 4 );
 
   Geometry geometry = Geometry::New();
-  geometry.AddVertexBuffer( propertyBuffer );
+  geometry.AddVertexBuffer( vertexBuffer );
 
   Shader shader = CreateShader();
   Renderer renderer = Renderer::New(geometry, shader);
@@ -244,8 +244,8 @@ int UtcDaliPropertyBufferSetData02(void)
     DALI_TEST_EQUALS( bufferDataCalls[0], sizeof(texturedQuadVertexData), TEST_LOCATION );
   }
 
-  // Re-upload the data on the propertyBuffer
-  propertyBuffer.SetData( texturedQuadVertexData, 4 );
+  // Re-upload the data on the vertexBuffer
+  vertexBuffer.SetData( texturedQuadVertexData, 4 );
 
   application.SendNotification();
   application.Render(0);
@@ -271,7 +271,7 @@ int UtcDaliPropertyBufferSetData02(void)
   END_TEST;
 }
 
-int UtcDaliPropertyBufferInvalidTypeN(void)
+int UtcDaliVertexBufferInvalidTypeN(void)
 {
   TestApplication application;
 
@@ -281,21 +281,21 @@ int UtcDaliPropertyBufferInvalidTypeN(void)
 
   try
   {
-    PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+    VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
     tet_result(TET_FAIL);
   }
   catch ( Dali::DaliException& e )
   {
-    DALI_TEST_ASSERT( e, "Property::Type not supported in PropertyBuffer", TEST_LOCATION );
+    DALI_TEST_ASSERT( e, "Property::Type not supported in VertexBuffer", TEST_LOCATION );
   }
   END_TEST;
 }
 
 
-int UtcDaliPropertyBufferSetDataNegative(void)
+int UtcDaliVertexBufferSetDataNegative(void)
 {
   TestApplication application;
-  Dali::PropertyBuffer instance;
+  Dali::VertexBuffer instance;
   try
   {
     void* arg1(nullptr);
@@ -310,10 +310,10 @@ int UtcDaliPropertyBufferSetDataNegative(void)
   END_TEST;
 }
 
-int UtcDaliPropertyBufferGetSizeNegative(void)
+int UtcDaliVertexBufferGetSizeNegative(void)
 {
   TestApplication application;
-  Dali::PropertyBuffer instance;
+  Dali::VertexBuffer instance;
   try
   {
     instance.GetSize();
index 86c7f5e..03458cd 100644 (file)
@@ -42,7 +42,7 @@
 #include <dali/internal/update/rendering/scene-graph-renderer.h>
 
 #include <dali/internal/render/renderers/render-geometry.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 #include <dali/internal/render/renderers/render-renderer.h>
 #include <dali/internal/render/renderers/render-sampler.h>
 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
@@ -103,8 +103,8 @@ const std::size_t GEOMETRY_MEMORY_SIZE(
   sizeof( Internal::Geometry ) +
   sizeof( Internal::Render::Geometry) );
 const std::size_t PROPERTY_BUFFER_MEMORY_SIZE(
-  sizeof( Internal::PropertyBuffer ) +
-  sizeof( Internal::Render::PropertyBuffer ) );
+  sizeof( Internal::VertexBuffer ) +
+  sizeof( Internal::Render::VertexBuffer ) );
 const std::size_t TEXTURE_SET_MEMORY_SIZE(
   sizeof( Internal::TextureSet ) +
   sizeof( Internal::SceneGraph::TextureSet ) );
index 57469e5..5e7d540 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ GeometryPtr Geometry::New()
   return geometry;
 }
 
-uint32_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+uint32_t Geometry::AddVertexBuffer( VertexBuffer& vertexBuffer )
 {
   mVertexBuffers.push_back( &vertexBuffer );
   SceneGraph::AttachVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, *vertexBuffer.GetRenderObject() );
@@ -49,8 +49,8 @@ uint32_t Geometry::GetNumberOfVertexBuffers() const
 
 void Geometry::RemoveVertexBuffer( uint32_t index )
 {
-  const Render::PropertyBuffer& renderPropertyBuffer = static_cast<const Render::PropertyBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
-  SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderPropertyBuffer );
+  const Render::VertexBuffer& renderVertexBuffer = static_cast<const Render::VertexBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
+  SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderVertexBuffer );
 
   mVertexBuffers.erase( mVertexBuffers.begin() + index );
 }
index 018fea4..d1cc60d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GEOMETRY_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
 #include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
 #include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
 #include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
 #include <dali/internal/render/renderers/render-geometry.h>
 
 namespace Dali
@@ -60,7 +60,7 @@ public:
   /**
    * @copydoc Dali::Geometry::AddVertexBuffer()
    */
-  uint32_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+  uint32_t AddVertexBuffer( VertexBuffer& vertexBuffer );
 
   /**
    * @copydoc Dali::Geometry::GetNumberOfVertexBuffers()
@@ -122,7 +122,7 @@ private: // data
   EventThreadServices& mEventThreadServices;    ///<Used to send messages to the render thread via update thread
   Render::Geometry* mRenderObject;
 
-  std::vector<PropertyBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
+  std::vector<VertexBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
   Dali::Geometry::Type mType;      ///< Geometry type (cached)
 };
 
index 295b322..6c4a8b8 100644 (file)
 #include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
 #include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
 #include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
 #include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
-#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
 #include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
+#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
+
 
 namespace Dali
 {
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // CLASS HEADER
-#include <dali/internal/event/common/property-buffer-impl.h>
+#include <dali/internal/event/rendering/vertex-buffer-impl.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/rendering/property-buffer.h>
+#include <dali/public-api/rendering/vertex-buffer.h>
 #include <dali/internal/update/manager/update-manager.h>
 
 #if defined (ANDROID) || defined(WIN32)
@@ -135,24 +135,24 @@ uint32_t GetPropertyImplementationAlignment( Property::Type& propertyType )
 
 } // unnamed namespace
 
-PropertyBufferPtr PropertyBuffer::New( Dali::Property::Map& format )
+VertexBufferPtr VertexBuffer::New( Dali::Property::Map& format )
 {
   DALI_ASSERT_ALWAYS( format.Count() && "Format cannot be empty." );
 
-  PropertyBufferPtr propertyBuffer( new PropertyBuffer() );
-  propertyBuffer->Initialize( format );
+  VertexBufferPtr vertexBuffer( new VertexBuffer() );
+  vertexBuffer->Initialize( format );
 
-  return propertyBuffer;
+  return vertexBuffer;
 }
 
-void PropertyBuffer::SetData( const void* data, uint32_t size )
+void VertexBuffer::SetData( const void* data, uint32_t size )
 {
   mSize = size; // size is the number of elements
 
   uint32_t bufferSize = mBufferFormatSize * mSize;
 
   // create a new DALi vector to store the buffer data
-  // the heap allocated vector will end up being owned by Render::PropertyBuffer
+  // the heap allocated vector will end up being owned by Render::VertexBuffer
   OwnerPointer< Vector<uint8_t> > bufferCopy = new Dali::Vector<uint8_t>();
   bufferCopy->Resize( bufferSize );
 
@@ -162,28 +162,28 @@ void PropertyBuffer::SetData( const void* data, uint32_t size )
   std::copy( source, source + bufferSize, destination );
 
   // Ownership of the bufferCopy is passed to the message ( uses an owner pointer )
-  SceneGraph::SetPropertyBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, bufferCopy, mSize );
+  SceneGraph::SetVertexBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, bufferCopy, mSize );
 }
 
-uint32_t PropertyBuffer::GetSize() const
+uint32_t VertexBuffer::GetSize() const
 {
   return mSize;
 }
 
-const Render::PropertyBuffer* PropertyBuffer::GetRenderObject() const
+const Render::VertexBuffer* VertexBuffer::GetRenderObject() const
 {
   return mRenderObject;
 }
 
-PropertyBuffer::~PropertyBuffer()
+VertexBuffer::~VertexBuffer()
 {
   if( EventThreadServices::IsCoreRunning() && mRenderObject)
   {
-    SceneGraph::RemovePropertyBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
+    SceneGraph::RemoveVertexBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
   }
 }
 
-PropertyBuffer::PropertyBuffer()
+VertexBuffer::VertexBuffer()
 : mEventThreadServices( EventThreadServices::Get() ),
   mRenderObject( NULL ),
   mBufferFormatSize( 0 ),
@@ -191,16 +191,16 @@ PropertyBuffer::PropertyBuffer()
 {
 }
 
-void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
+void VertexBuffer::Initialize( Dali::Property::Map& formatMap )
 {
-  mRenderObject = new Render::PropertyBuffer();
-  OwnerPointer< Render::PropertyBuffer > transferOwnership( mRenderObject );
-  SceneGraph::AddPropertyBuffer( mEventThreadServices.GetUpdateManager(), transferOwnership );
+  mRenderObject = new Render::VertexBuffer();
+  OwnerPointer< Render::VertexBuffer > transferOwnership( mRenderObject );
+  SceneGraph::AddVertexBuffer( mEventThreadServices.GetUpdateManager(), transferOwnership );
 
   uint32_t numComponents = static_cast<uint32_t>( formatMap.Count() );
 
   // Create the format
-  OwnerPointer< Render::PropertyBuffer::Format> format = new Render::PropertyBuffer::Format();
+  OwnerPointer< Render::VertexBuffer::Format> format = new Render::VertexBuffer::Format();
   format->components.resize( numComponents );
 
   uint32_t currentAlignment = 0u;
@@ -226,7 +226,7 @@ void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
         ( type == Property::ARRAY  ) ||
         ( type == Property::MAP    ) )
     {
-      DALI_ABORT( "Property::Type not supported in PropertyBuffer" );
+      DALI_ABORT( "Property::Type not supported in VertexBuffer" );
     }
     uint32_t elementSize = GetPropertyImplementationSize( type );
     uint32_t elementAlignment = GetPropertyImplementationAlignment( type );
@@ -269,7 +269,7 @@ void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
 
   mBufferFormatSize = format->size;
 
-  SceneGraph::SetPropertyBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
+  SceneGraph::SetVertexBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
 }
 
 uint32_t GetPropertyImplementationSize( Property::Type& propertyType )
@@ -1,8 +1,8 @@
-#ifndef DALI_INTERNAL_PROPERTY_BUFFER_H
-#define DALI_INTERNAL_PROPERTY_BUFFER_H
+#ifndef DALI_INTERNAL_VERTEX_BUFFER_H
+#define DALI_INTERNAL_VERTEX_BUFFER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/property-map.h> // Dali::Property::Map
 #include <dali/internal/event/common/event-thread-services.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 
 namespace Dali
 {
 namespace Internal
 {
 
-class PropertyBuffer;
-typedef IntrusivePtr<PropertyBuffer> PropertyBufferPtr;
+class VertexBuffer;
+typedef IntrusivePtr<VertexBuffer> VertexBufferPtr;
 
 /**
- * PropertyBuffer is an object that contains an array of structures of values that
+ * VertexBuffer is an object that contains an array of structures of values that
  * can be accessed as properties.
  */
-class PropertyBuffer : public BaseObject
+class VertexBuffer : public BaseObject
 {
 public:
 
   /**
    * @copydoc PropertBuffer::New()
    */
-  static PropertyBufferPtr New( Dali::Property::Map& format );
+  static VertexBufferPtr New( Dali::Property::Map& format );
 
   /**
    * @copydoc PropertBuffer::SetData()
@@ -60,23 +60,23 @@ public:
 public: // Default property extensions from Object
 
   /**
-   * @brief Get the render thread side of the PropertyBuffer
+   * @brief Get the render thread side of the VertexBuffer
    *
-   * @return The render thread side of this PropertyBuffer
+   * @return The render thread side of this VertexBuffer
    */
-  const Render::PropertyBuffer* GetRenderObject() const;
+  const Render::VertexBuffer* GetRenderObject() const;
 
 protected:
   /**
    * @brief Destructor
    */
-  ~PropertyBuffer();
+  ~VertexBuffer();
 
 private: // implementation
   /**
    * @brief Default constructor
    */
-  PropertyBuffer();
+  VertexBuffer();
 
   /**
    * Second stage initialization
@@ -84,12 +84,12 @@ private: // implementation
   void Initialize( Dali::Property::Map& format );
 
 private: // unimplemented methods
-  PropertyBuffer( const PropertyBuffer& );
-  PropertyBuffer& operator=( const PropertyBuffer& );
+  VertexBuffer( const VertexBuffer& );
+  VertexBuffer& operator=( const VertexBuffer& );
 
 private: // data
   EventThreadServices& mEventThreadServices;    ///<Used to send messages to the render thread via update thread
-  Render::PropertyBuffer* mRenderObject;        ///<Render side object
+  Render::VertexBuffer* mRenderObject;        ///<Render side object
   uint32_t mBufferFormatSize;
   uint32_t mSize; ///< Number of elements in the buffer
 };
@@ -99,7 +99,7 @@ private: // data
  */
 template<Property::Type type> struct PropertyImplementationType
 {
-  // typedef ... Type; not defined, only support types declared bellow
+  // typedef ... Type; not defined, only support types declared below
 };
 template<> struct PropertyImplementationType< Property::BOOLEAN > { typedef bool Type; };
 template<> struct PropertyImplementationType< Property::FLOAT > { typedef float Type; };
@@ -117,24 +117,24 @@ uint32_t GetPropertyImplementationSize( Property::Type& propertyType );
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Internal::PropertyBuffer& GetImplementation(Dali::PropertyBuffer& handle)
+inline Internal::VertexBuffer& GetImplementation(Dali::VertexBuffer& handle)
 {
-  DALI_ASSERT_ALWAYS(handle && "PropertyBuffer handle is empty");
+  DALI_ASSERT_ALWAYS(handle && "VertexBuffer handle is empty");
 
   BaseObject& object = handle.GetBaseObject();
 
-  return static_cast<Internal::PropertyBuffer&>(object);
+  return static_cast<Internal::VertexBuffer&>(object);
 }
 
-inline const Internal::PropertyBuffer& GetImplementation(const Dali::PropertyBuffer& handle)
+inline const Internal::VertexBuffer& GetImplementation(const Dali::VertexBuffer& handle)
 {
-  DALI_ASSERT_ALWAYS(handle && "PropertyBuffer handle is empty");
+  DALI_ASSERT_ALWAYS(handle && "VertexBuffer handle is empty");
 
   const BaseObject& object = handle.GetBaseObject();
 
-  return static_cast<const Internal::PropertyBuffer&>(object);
+  return static_cast<const Internal::VertexBuffer&>(object);
 }
 
 } // namespace Dali
 
-#endif // DALI_INTERNAL_PROPERTY_BUFFER_H
+#endif // DALI_INTERNAL_VERTEX_BUFFER_H
index 64f37e5..f748935 100644 (file)
@@ -32,7 +32,6 @@ SET( internal_src_files
   ${internal_src_dir}/event/common/object-impl.cpp
   ${internal_src_dir}/event/common/object-registry-impl.cpp
   ${internal_src_dir}/event/common/projection.cpp
-  ${internal_src_dir}/event/common/property-buffer-impl.cpp
   ${internal_src_dir}/event/common/property-conditions-impl.cpp
   ${internal_src_dir}/event/common/property-metadata.cpp
   ${internal_src_dir}/event/common/property-notification-impl.cpp
@@ -92,6 +91,7 @@ SET( internal_src_files
   ${internal_src_dir}/event/rendering/renderer-impl.cpp
   ${internal_src_dir}/event/rendering/sampler-impl.cpp
   ${internal_src_dir}/event/rendering/shader-impl.cpp
+  ${internal_src_dir}/event/rendering/vertex-buffer-impl.cpp
   ${internal_src_dir}/event/size-negotiation/memory-pool-relayout-container.cpp
   ${internal_src_dir}/event/size-negotiation/relayout-controller-impl.cpp
 
@@ -110,7 +110,7 @@ SET( internal_src_files
   ${internal_src_dir}/render/queue/render-queue.cpp
   ${internal_src_dir}/render/renderers/render-frame-buffer.cpp
   ${internal_src_dir}/render/renderers/render-geometry.cpp
-  ${internal_src_dir}/render/renderers/render-property-buffer.cpp
+  ${internal_src_dir}/render/renderers/render-vertex-buffer.cpp
   ${internal_src_dir}/render/renderers/render-renderer.cpp
   ${internal_src_dir}/render/renderers/render-texture.cpp
   ${internal_src_dir}/render/shaders/program.cpp
index 3ec8755..75415ed 100644 (file)
@@ -206,7 +206,7 @@ struct RenderManager::Impl
   OwnerContainer< Render::Sampler* >        samplerContainer;        ///< List of owned samplers
   OwnerContainer< Render::Texture* >        textureContainer;        ///< List of owned textures
   OwnerContainer< Render::FrameBuffer* >    frameBufferContainer;    ///< List of owned framebuffers
-  OwnerContainer< Render::PropertyBuffer* > propertyBufferContainer; ///< List of owned property buffers
+  OwnerContainer< Render::VertexBuffer* >   vertexBufferContainer;   ///< List of owned vertex buffers
   OwnerContainer< Render::Geometry* >       geometryContainer;       ///< List of owned Geometries
 
   bool                                      lastFrameWasRendered;    ///< Keeps track of the last frame being rendered due to having render instructions
@@ -436,24 +436,24 @@ void RenderManager::AttachDepthStencilTextureToFrameBuffer( Render::FrameBuffer*
   frameBuffer->AttachDepthStencilTexture( mImpl->context, texture, mipmapLevel );
 }
 
-void RenderManager::AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+void RenderManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
 {
-  mImpl->propertyBufferContainer.PushBack( propertyBuffer.Release() );
+  mImpl->vertexBufferContainer.PushBack( vertexBuffer.Release() );
 }
 
-void RenderManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void RenderManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer )
 {
-  mImpl->propertyBufferContainer.EraseObject( propertyBuffer );
+  mImpl->vertexBufferContainer.EraseObject( vertexBuffer );
 }
 
-void RenderManager::SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+void RenderManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
 {
-  propertyBuffer->SetFormat( format.Release() );
+  vertexBuffer->SetFormat( format.Release() );
 }
 
-void RenderManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+void RenderManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
 {
-  propertyBuffer->SetData( data.Release(), size );
+  vertexBuffer->SetData( data.Release(), size );
 }
 
 void RenderManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uint16_t>& indices )
@@ -471,7 +471,7 @@ void RenderManager::RemoveGeometry( Render::Geometry* geometry )
   mImpl->geometryContainer.EraseObject( geometry );
 }
 
-void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
   DALI_ASSERT_DEBUG( NULL != geometry );
 
@@ -480,13 +480,13 @@ void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::Prop
   {
     if ( iter == geometry )
     {
-      iter->AddPropertyBuffer( propertyBuffer );
+      iter->AddVertexBuffer( vertexBuffer );
       break;
     }
   }
 }
 
-void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
   DALI_ASSERT_DEBUG( NULL != geometry );
 
@@ -495,7 +495,7 @@ void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::Prop
   {
     if ( iter == geometry )
     {
-      iter->RemovePropertyBuffer( propertyBuffer );
+      iter->RemoveVertexBuffer( vertexBuffer );
       break;
     }
   }
index abc3c12..2e3ea2d 100644 (file)
@@ -22,9 +22,9 @@
 #include <dali/public-api/math/rect.h>
 #include <dali/integration-api/core-enumerations.h>
 #include <dali/internal/common/shader-saver.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
 #include <dali/internal/event/rendering/texture-impl.h>
+#include <dali/internal/render/gl-resources/gpu-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 
 namespace Dali
 {
@@ -62,7 +62,6 @@ class RenderQueue;
 class RenderInstruction;
 class RenderInstructionContainer;
 class Shader;
-class PropertyBufferDataProvider;
 class Scene;
 
 /**
@@ -176,17 +175,17 @@ public:
 
   /**
    * Add a property buffer to the render manager.
-   * @param[in] propertyBuffer The property buffer to add.
+   * @param[in] vertexBuffer The property buffer to add.
    * @post propertBuffer is owned by RenderManager
    */
-  void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer );
+  void AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer );
 
   /**
    * Remove a property buffer from the render manager.
-   * @param[in] propertyBuffer The property buffer to remove.
-   * @post propertyBuffer is destroyed.
+   * @param[in] vertexBuffer The property buffer to remove.
+   * @post vertexBuffer is destroyed.
    */
-  void RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer );
 
   /**
    * Add a geometry to the render manager.
@@ -205,32 +204,32 @@ public:
   /**
    * Adds a property buffer to a geometry from the render manager.
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer to remove.
+   * @param[in] vertexBuffer The property buffer to remove.
    */
-  void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Remove a property buffer from a Render::Geometry from the render manager.
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer to remove.
+   * @param[in] vertexBuffer The property buffer to remove.
    * @post property buffer is destroyed.
    */
-  void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Sets the format of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] format The new format of the buffer
    */
-  void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
+  void SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format );
 
   /**
    * Sets the data of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] data The new data of the buffer
    * @param[in] size The new size of the buffer
    */
-  void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
+  void SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
 
   /**
    * Sets the data for the index buffer of an existing geometry
diff --git a/dali/internal/render/data-providers/property-buffer-data-provider.h b/dali/internal/render/data-providers/property-buffer-data-provider.h
deleted file mode 100644 (file)
index 51c8f64..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property.h>
-#include <dali/internal/common/buffer-index.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-
-class PropertyBufferDataProvider
-{
-public:
-
-  /**
-   * Type for the data contained in the buffer
-   */
-  typedef Dali::Vector< char > BufferType;
-
-public:
-  /**
-   * Constructor
-   */
-  PropertyBufferDataProvider()
-  {
-  }
-
-  /**
-   * Get the number of attributes
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the number of attributes
-   */
-  virtual unsigned int GetAttributeCount( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the name of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the name of the attribute
-   */
-  virtual const std::string& GetAttributeName( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the byte size of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the byte size of the attribute
-   */
-  virtual size_t GetAttributeSize( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the type of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the type of the attribute
-   */
-  virtual Property::Type GetAttributeType( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the byte offset of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the byte offset of the attribute
-   */
-  virtual size_t GetAttributeOffset( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the property buffer data
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the property buffer's data array
-   */
-  virtual const BufferType& GetData( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the size of the property buffer in bytes
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the size in bytes
-   */
-  virtual size_t GetDataSize( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the size of an element of the buffer in bytes
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the element size in bytes
-   */
-  virtual size_t GetElementSize( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the number of elements
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the number of elements
-   */
-  virtual unsigned int GetElementCount( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get Id of the GPU buffer associated with this propertyBuffer
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the Id
-   */
-  virtual unsigned int GetGpuBufferId( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Checks if data in the PropertyBuffer has changed repect previous frame
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return true if data has changed, false otherwise
-   */
-  virtual bool HasDataChanged( BufferIndex bufferIndex ) const = 0;
-
-protected:
-  /**
-   * No deletion through this interface
-   */
-  virtual ~PropertyBufferDataProvider()
-  {
-  }
-};
-
-} // namespace SceneGraph
-} // namespace Internal
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
index 3d5573e..2ca0a45 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/internal/render/data-providers/node-data-provider.h>
-#include <dali/internal/render/data-providers/property-buffer-data-provider.h>
 #include <dali/internal/render/data-providers/uniform-map-data-provider.h>
 #include <dali/internal/render/renderers/render-sampler.h>
 #include <dali/internal/render/renderers/render-texture.h>
@@ -36,7 +35,6 @@ struct BlendingOptions;
 
 namespace SceneGraph
 {
-class PropertyBuffer;
 class Shader;
 class Renderer;
 
@@ -50,7 +48,6 @@ class Renderer;
 class RenderDataProvider
 {
 public:
-  typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
   typedef std::vector< Render::Sampler* > Samplers;
 
   /**
index 17ba522..592ec6d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
 #include <dali/internal/common/buffer-index.h>
 #include <dali/internal/render/gl-resources/context.h>
 #include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 #include <dali/internal/render/shaders/program.h>
 
 namespace Dali
@@ -53,9 +53,9 @@ void Geometry::GlContextDestroyed()
 {
 }
 
-void Geometry::AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void Geometry::AddVertexBuffer( Render::VertexBuffer* vertexBuffer )
 {
-  mVertexBuffers.PushBack( propertyBuffer );
+  mVertexBuffers.PushBack( vertexBuffer );
   mAttributesChanged = true;
 }
 
@@ -65,14 +65,14 @@ void Geometry::SetIndexBuffer( Dali::Vector<uint16_t>& indices )
   mIndicesChanged = true;
 }
 
-void Geometry::RemovePropertyBuffer( const Render::PropertyBuffer* propertyBuffer )
+void Geometry::RemoveVertexBuffer( const Render::VertexBuffer* vertexBuffer )
 {
   const auto&& end = mVertexBuffers.End();
   for( auto&& iter = mVertexBuffers.Begin(); iter != end; ++iter )
   {
-    if( *iter == propertyBuffer )
+    if( *iter == vertexBuffer )
     {
-      //This will delete the gpu buffer associated to the RenderPropertyBuffer if there is one
+      //This will delete the gpu buffer associated to the RenderVertexBuffer if there is one
       mVertexBuffers.Remove( iter );
       mAttributesChanged = true;
       break;
index f08cbce..c8ac1e5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_RENDER_GEOMETRY_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ class GpuBuffer;
 
 namespace Render
 {
-class PropertyBuffer;
+class VertexBuffer;
 
 /**
  * This class encapsulates the GPU buffers. It is used to upload vertex data
@@ -68,9 +68,9 @@ public:
 
   /**
    * Adds a property buffer to the geometry
-   * @param[in] dataProvider The PropertyBuffer data provider
+   * @param[in] dataProvider The VertexBuffer data provider
    */
-  void AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer );
+  void AddVertexBuffer( Render::VertexBuffer* vertexBuffer );
 
   /**
    * Set the data for the index buffer to be used by the geometry
@@ -79,10 +79,10 @@ public:
   void SetIndexBuffer( Dali::Vector<uint16_t>& indices );
 
   /**
-   * Removes a PropertyBuffer from the geometry
-   * @param[in] propertyBuffer The property buffer to be removed
+   * Removes a VertexBuffer from the geometry
+   * @param[in] vertexBuffer The property buffer to be removed
    */
-  void RemovePropertyBuffer(  const Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer(  const Render::VertexBuffer* vertexBuffer );
 
   /**
    * Gets the attribute locations on the shader for the attributes defined in the geometry RenderBuffers
@@ -137,8 +137,8 @@ public:
 
 private:
 
-  // PropertyBuffers
-  Vector< Render::PropertyBuffer* > mVertexBuffers;
+  // VertexBuffers
+  Vector< Render::VertexBuffer* > mVertexBuffers;
 
   Dali::Vector< uint16_t > mIndices;
   OwnerPointer< GpuBuffer > mIndexBuffer;
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,8 +15,8 @@
  *
  */
 
-#include <dali/internal/render/renderers/render-property-buffer.h>
-#include <dali/internal/event/common/property-buffer-impl.h>  // Dali::Internal::PropertyBuffer
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
+#include <dali/internal/event/rendering/vertex-buffer-impl.h>  // Dali::Internal::VertexBuffer
 
 namespace
 {
@@ -116,7 +116,7 @@ namespace Internal
 namespace Render
 {
 
-PropertyBuffer::PropertyBuffer()
+VertexBuffer::VertexBuffer()
 :mFormat(NULL),
  mData(NULL),
  mGpuBuffer(NULL),
@@ -125,24 +125,24 @@ PropertyBuffer::PropertyBuffer()
 {
 }
 
-PropertyBuffer::~PropertyBuffer()
+VertexBuffer::~VertexBuffer()
 {
 }
 
-void PropertyBuffer::SetFormat( PropertyBuffer::Format* format )
+void VertexBuffer::SetFormat( VertexBuffer::Format* format )
 {
   mFormat = format;
   mDataChanged = true;
 }
 
-void PropertyBuffer::SetData( Dali::Vector<uint8_t>* data, uint32_t size )
+void VertexBuffer::SetData( Dali::Vector<uint8_t>* data, uint32_t size )
 {
   mData = data;
   mSize = size;
   mDataChanged = true;
 }
 
-bool PropertyBuffer::Update( Context& context )
+bool VertexBuffer::Update( Context& context )
 {
   if( !mData || !mFormat || !mSize )
   {
@@ -169,7 +169,7 @@ bool PropertyBuffer::Update( Context& context )
   return true;
 }
 
-void PropertyBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
+void VertexBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
 {
   if(mGpuBuffer)
   {
@@ -177,7 +177,7 @@ void PropertyBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
   }
 }
 
-uint32_t PropertyBuffer::EnableVertexAttributes( Context& context, Vector<GLint>& vAttributeLocation, uint32_t locationBase )
+uint32_t VertexBuffer::EnableVertexAttributes( Context& context, Vector<GLint>& vAttributeLocation, uint32_t locationBase )
 {
   const uint32_t attributeCount = static_cast<uint32_t>( mFormat->components.size() );
 
@@ -1,8 +1,8 @@
-#ifndef DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
-#define DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
+#ifndef DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
+#define DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ namespace Internal
 namespace Render
 {
 
-class PropertyBuffer
+class VertexBuffer
 {
 public:
 
@@ -45,7 +45,7 @@ public:
   };
 
   /**
-   * Structure that holds the meta-data of the format of PropertyBuffer.
+   * Structure that holds the meta-data of the format of VertexBuffer.
    */
   struct Format
   {
@@ -56,27 +56,27 @@ public:
   /**
    * @brief Default constructor
    */
-  PropertyBuffer();
+  VertexBuffer();
 
   /**
    * @brief Destructor
    */
-  ~PropertyBuffer();
+  ~VertexBuffer();
 
   /**
    * @brief Set the format of the buffer
    *
    * This function takes ownership of the pointer
    *
-   * @param[in] format The format for the PropertyBuffer
+   * @param[in] format The format for the VertexBuffer
    */
-  void SetFormat( PropertyBuffer::Format* format );
+  void SetFormat( VertexBuffer::Format* format );
 
   /**
-   * @brief Set the data of the PropertyBuffer
+   * @brief Set the data of the VertexBuffer
    *
    * This function takes ownership of the pointer
-   * @param[in] data The new data of the PropertyBuffer
+   * @param[in] data The new data of the VertexBuffer
    * @param[in] size The new size of the buffer
    */
   void SetData( Dali::Vector<uint8_t>* data, uint32_t size );
@@ -180,15 +180,15 @@ public:
     return reinterpret_cast<T*>( &data->operator[]( 0 ) );
   }
 
-  inline const PropertyBuffer::Format* GetFormat() const
+  inline const VertexBuffer::Format* GetFormat() const
   {
     return mFormat.Get();
   }
 
 private:
-  OwnerPointer< PropertyBuffer::Format >  mFormat;    ///< Format of the buffer
+  OwnerPointer< VertexBuffer::Format >  mFormat;    ///< Format of the buffer
   OwnerPointer< Dali::Vector< uint8_t > > mData;      ///< Data
-  OwnerPointer< GpuBuffer >               mGpuBuffer; ///< Pointer to the GpuBuffer associated with this RenderPropertyBuffer
+  OwnerPointer< GpuBuffer >               mGpuBuffer; ///< Pointer to the GpuBuffer associated with this RenderVertexBuffer
 
   uint32_t mSize;       ///< Number of Elements in the buffer
   bool mDataChanged;  ///< Flag to know if data has changed in a frame
@@ -201,4 +201,4 @@ private:
 } // namespace Dali
 
 
-#endif //  DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
+#endif //  DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
index 30e1866..fab009c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_MESSAGE_DISPATCHER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,9 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/internal/update/common/scene-graph-buffers.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
 #include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
 
 namespace Dali
 {
@@ -35,12 +33,13 @@ namespace Render
 {
 class RenderTracker;
 }
+
 namespace SceneGraph
 {
 
 class RenderManager;
 class RenderQueue;
-class PropertyBufferDataProvider;
+
 /**
  * A utility class for sending messages to the render-thread.
  */
index 3e71956..35a1839 100644 (file)
@@ -31,7 +31,6 @@
 #include <dali/internal/render/common/render-instruction-container.h>
 #include <dali/internal/render/shaders/scene-graph-shader.h>
 #include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
 #include <dali/internal/update/nodes/scene-graph-layer.h>
 
 namespace
index 4272e48..b0a3787 100644 (file)
@@ -1235,51 +1235,51 @@ void UpdateManager::SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, u
   new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetWrapMode, sampler, rWrapMode, sWrapMode, tWrapMode );
 }
 
-void UpdateManager::AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+void UpdateManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
 {
   // Message has ownership of format while in transit from update -> render
-  typedef MessageValue1< RenderManager, OwnerPointer< Render::PropertyBuffer > > DerivedType;
+  typedef MessageValue1< RenderManager, OwnerPointer< Render::VertexBuffer > > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AddPropertyBuffer, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AddVertexBuffer, vertexBuffer );
 }
 
-void UpdateManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer )
 {
-  typedef MessageValue1< RenderManager, Render::PropertyBuffer* > DerivedType;
+  typedef MessageValue1< RenderManager, Render::VertexBuffer* > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemovePropertyBuffer, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemoveVertexBuffer, vertexBuffer );
 }
 
-void UpdateManager::SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+void UpdateManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
 {
   // Message has ownership of format while in transit from update -> render
-  typedef MessageValue2< RenderManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format > > DerivedType;
+  typedef MessageValue2< RenderManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format > > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetPropertyBufferFormat, propertyBuffer, format );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetVertexBufferFormat, vertexBuffer, format );
 }
 
-void UpdateManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+void UpdateManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
 {
   // Message has ownership of format while in transit from update -> render
-  typedef MessageValue3< RenderManager, Render::PropertyBuffer*, OwnerPointer< Dali::Vector<uint8_t> >, uint32_t > DerivedType;
+  typedef MessageValue3< RenderManager, Render::VertexBuffer*, OwnerPointer< Dali::Vector<uint8_t> >, uint32_t > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetPropertyBufferData, propertyBuffer, data, size );
+  new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetVertexBufferData, vertexBuffer, data, size );
 }
 
 void UpdateManager::AddGeometry( OwnerPointer< Render::Geometry >& geometry )
@@ -1327,26 +1327,26 @@ void UpdateManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uin
   new (slot) DerivedType( &mImpl->renderManager, geometry, indices );
 }
 
-void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
-  typedef MessageValue2< RenderManager, Render::Geometry*, Render::PropertyBuffer* > DerivedType;
+  typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemoveVertexBuffer, geometry, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemoveVertexBuffer, geometry, vertexBuffer );
 }
 
-void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
-  typedef MessageValue2< RenderManager, Render::Geometry*, Render::PropertyBuffer* > DerivedType;
+  typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AttachVertexBuffer, geometry, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AttachVertexBuffer, geometry, vertexBuffer );
 }
 
 void UpdateManager::AddTexture( OwnerPointer< Render::Texture >& texture )
index f07a3be..419fec3 100644 (file)
@@ -42,7 +42,7 @@
 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
 #include <dali/internal/update/render-tasks/scene-graph-render-task-list.h>
 #include <dali/internal/render/shaders/scene-graph-shader.h>   // for OwnerPointer< Shader >
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 #include <dali/internal/event/rendering/texture-impl.h>
 
 namespace Dali
@@ -83,7 +83,7 @@ class RenderManager;
 class RenderTaskList;
 class RenderTaskProcessor;
 class RenderQueue;
-class PropertyBuffer;
+class VertexBuffer;
 
 struct NodeDepthPair
 {
@@ -470,31 +470,31 @@ public:
    * @post Sends a message to RenderManager to add the property buffer.
    * The property buffer will be owned by RenderManager
    */
-  void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertryBuffer );
+  void AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& propertryBuffer );
 
   /**
-   * Removes an existing PropertyBuffer from RenderManager
+   * Removes an existing VertexBuffer from RenderManager
    * @param[in] propertryBuffer The property buffer to remove
    * @post The property buffer will be destroyed in the render thread
    */
-  void RemovePropertyBuffer( Render::PropertyBuffer* propertryBuffer );
+  void RemoveVertexBuffer( Render::VertexBuffer* propertryBuffer );
 
   /**
    * Sets the format of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] format The new format of the buffer
    * @post Sends a message to RenderManager to set the new format to the property buffer.
    */
-  void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
+  void SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format );
 
   /**
    * Sets the data of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] data The new data of the buffer
    * @param[in] size The new size of the buffer
    * @post Sends a message to RenderManager to set the new data to the property buffer.
    */
-  void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
+  void SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
 
   /**
    * Adds a geometry to the RenderManager
@@ -528,16 +528,16 @@ public:
   /**
    * Adds a vertex buffer to a geometry
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer
+   * @param[in] vertexBuffer The property buffer
    */
-  void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Removes a vertex buffer from a geometry
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer
+   * @param[in] vertexBuffer The property buffer
    */
-  void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Adds a texture to the render manager
@@ -1216,51 +1216,51 @@ inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler
   new (slot) LocalType( &manager, &UpdateManager::SetWrapMode, &sampler, rWrapMode, sWrapMode, tWrapMode );
 }
 
-inline void AddPropertyBuffer( UpdateManager& manager, OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::VertexBuffer >& vertexBuffer )
 {
-  // Message has ownership of propertyBuffer while in transit from event -> update
-  typedef MessageValue1< UpdateManager, OwnerPointer< Render::PropertyBuffer > > LocalType;
+  // Message has ownership of vertexBuffer while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Render::VertexBuffer > > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::AddPropertyBuffer, propertyBuffer );
+  new (slot) LocalType( &manager, &UpdateManager::AddVertexBuffer, vertexBuffer );
 }
 
-inline void RemovePropertyBuffer( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer )
+inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& vertexBuffer )
 {
-  typedef MessageValue1< UpdateManager, Render::PropertyBuffer*  > LocalType;
+  typedef MessageValue1< UpdateManager, Render::VertexBuffer*  > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::RemovePropertyBuffer, &propertyBuffer );
+  new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &vertexBuffer );
 }
 
-inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
 {
-  // Message has ownership of PropertyBuffer::Format while in transit from event -> update
-  typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format> > LocalType;
+  // Message has ownership of VertexBuffer::Format while in transit from event -> update
+  typedef MessageValue2< UpdateManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format> > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
+  new (slot) LocalType( &manager, &UpdateManager::SetVertexBufferFormat, &vertexBuffer, format );
 }
 
-inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
 {
-  // Message has ownership of PropertyBuffer data while in transit from event -> update
-  typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t  > LocalType;
+  // Message has ownership of VertexBuffer data while in transit from event -> update
+  typedef MessageValue3< UpdateManager, Render::VertexBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t  > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
+  new (slot) LocalType( &manager, &UpdateManager::SetVertexBufferData, &vertexBuffer, data, size );
 }
 
 inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry )
@@ -1286,26 +1286,26 @@ inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry )
   new (slot) LocalType( &manager, &UpdateManager::RemoveGeometry, &geometry );
 }
 
-inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
+inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer )
 {
-  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
+  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
+  new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::VertexBuffer*>(&vertexBuffer) );
 }
 
-inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
+inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer )
 {
-  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
+  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
+  new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::VertexBuffer*>(&vertexBuffer) );
 }
 
 // Custom message type for SetIndexBuffer() used to move data with Vector::Swap()
index 6627929..7c8af2b 100644 (file)
 
 #include <dali/public-api/rendering/frame-buffer.h>
 #include <dali/public-api/rendering/geometry.h>
-#include <dali/public-api/rendering/property-buffer.h>
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/public-api/rendering/sampler.h>
 #include <dali/public-api/rendering/shader.h>
 #include <dali/public-api/rendering/texture.h>
 #include <dali/public-api/rendering/texture-set.h>
+#include <dali/public-api/rendering/vertex-buffer.h>
 
 #include <dali/public-api/signals/base-signal.h>
 #include <dali/public-api/signals/callback.h>
index e3946ba..aee008e 100644 (file)
@@ -65,7 +65,7 @@ SET( public_api_src_files
   ${public_api_src_dir}/render-tasks/render-task-list.cpp
   ${public_api_src_dir}/rendering/frame-buffer.cpp
   ${public_api_src_dir}/rendering/geometry.cpp
-  ${public_api_src_dir}/rendering/property-buffer.cpp
+  ${public_api_src_dir}/rendering/vertex-buffer.cpp
   ${public_api_src_dir}/rendering/texture.cpp
   ${public_api_src_dir}/rendering/texture-set.cpp
   ${public_api_src_dir}/rendering/renderer.cpp
@@ -212,7 +212,7 @@ SET( public_api_core_render_tasks_header_files
 SET( public_api_core_rendering_header_files
   ${public_api_src_dir}/rendering/frame-buffer.h
   ${public_api_src_dir}/rendering/geometry.h
-  ${public_api_src_dir}/rendering/property-buffer.h
+  ${public_api_src_dir}/rendering/vertex-buffer.h
   ${public_api_src_dir}/rendering/texture.h
   ${public_api_src_dir}/rendering/texture-set.h
   ${public_api_src_dir}/rendering/renderer.h
index b1d0766..58b54be 100644 (file)
@@ -51,7 +51,7 @@ Geometry::Geometry( Geometry&& rhs ) =  default;
 
 Geometry& Geometry::operator=( Geometry&& rhs ) =  default;
 
-std::size_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+std::size_t Geometry::AddVertexBuffer( VertexBuffer& vertexBuffer )
 {
   DALI_ASSERT_ALWAYS( vertexBuffer && "VertexBuffer is not initialized ");
   return GetImplementation(*this).AddVertexBuffer( GetImplementation( vertexBuffer ) );
index a898e56..56cb874 100644 (file)
@@ -25,7 +25,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/object/handle.h> // Dali::Handle
 #include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
-#include <dali/public-api/rendering/property-buffer.h> // Dali::PropertyBuffer
+#include <dali/public-api/rendering/vertex-buffer.h> // Dali::VertexBuffer
 
 namespace Dali
 {
@@ -131,19 +131,19 @@ public:
   Geometry& operator=( Geometry&& rhs );
 
   /**
-   * @brief Adds a PropertyBuffer to be used as source of geometry vertices.
+   * @brief Adds a VertexBuffer to be used as source of geometry vertices.
    *
-   * @SINCE_1_1.43
-   * @param[in] vertexBuffer PropertyBuffer to be used as source of geometry vertices
+   * @SINCE_1_9.27
+   * @param[in] vertexBuffer VertexBuffer to be used as source of geometry vertices
    * @return Index of the newly added buffer, can be used with RemoveVertexBuffer to remove
    *         this buffer if no longer required
    */
-  std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+  std::size_t AddVertexBuffer( VertexBuffer& vertexBuffer );
 
   /**
    * @brief Retrieves the number of vertex buffers that have been added to this geometry.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @return Number of vertex buffers that have been added to this geometry
    */
   std::size_t GetNumberOfVertexBuffers() const;
@@ -152,7 +152,7 @@ public:
    * @brief Removes a vertex buffer.
    * The index must be between 0 and GetNumberOfVertexBuffers().
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] index Index to the vertex buffer to remove
    */
   void RemoveVertexBuffer( std::size_t index );
diff --git a/dali/public-api/rendering/property-buffer.cpp b/dali/public-api/rendering/property-buffer.cpp
deleted file mode 100644 (file)
index 839f202..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/public-api/rendering/property-buffer.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property-map.h>             // Dali::Property::Map
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
-
-namespace Dali
-{
-
-PropertyBuffer PropertyBuffer::New( Dali::Property::Map& bufferFormat )
-{
-  Internal::PropertyBufferPtr propertyBuffer = Internal::PropertyBuffer::New( bufferFormat );
-
-  return PropertyBuffer( propertyBuffer.Get() );
-}
-
-PropertyBuffer::PropertyBuffer()
-{
-}
-
-PropertyBuffer::~PropertyBuffer()
-{
-}
-
-PropertyBuffer::PropertyBuffer( const PropertyBuffer& handle ) = default;
-
-PropertyBuffer PropertyBuffer::DownCast( BaseHandle handle )
-{
-  return PropertyBuffer( dynamic_cast<Dali::Internal::PropertyBuffer*>(handle.GetObjectPtr()));
-}
-
-PropertyBuffer& PropertyBuffer::operator=( const PropertyBuffer& handle ) = default;
-
-PropertyBuffer::PropertyBuffer( PropertyBuffer&& rhs ) =  default;
-
-PropertyBuffer& PropertyBuffer::operator=( PropertyBuffer&& rhs ) =  default;
-
-void PropertyBuffer::SetData( const void* data, std::size_t size )
-{
-  GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
-}
-
-std::size_t PropertyBuffer::GetSize() const
-{
-  return  GetImplementation(*this).GetSize();
-}
-
-
-PropertyBuffer::PropertyBuffer( Internal::PropertyBuffer* pointer )
-: BaseHandle( pointer )
-{
-}
-
-} // namespace Dali
diff --git a/dali/public-api/rendering/vertex-buffer.cpp b/dali/public-api/rendering/vertex-buffer.cpp
new file mode 100644 (file)
index 0000000..3b7873d
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/public-api/rendering/vertex-buffer.h>
+
+// INTERNAL INCLUDES
+#include <dali/public-api/object/property-map.h>              // Dali::Property::Map
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
+
+namespace Dali
+{
+
+VertexBuffer VertexBuffer::New( Dali::Property::Map& bufferFormat )
+{
+  Internal::VertexBufferPtr vertexBuffer = Internal::VertexBuffer::New( bufferFormat );
+
+  return VertexBuffer( vertexBuffer.Get() );
+}
+
+VertexBuffer::VertexBuffer()
+{
+}
+
+VertexBuffer::~VertexBuffer()
+{
+}
+
+VertexBuffer::VertexBuffer( const VertexBuffer& handle ) = default;
+
+VertexBuffer VertexBuffer::DownCast( BaseHandle handle )
+{
+  return VertexBuffer( dynamic_cast<Dali::Internal::VertexBuffer*>(handle.GetObjectPtr()));
+}
+
+VertexBuffer& VertexBuffer::operator=( const VertexBuffer& handle ) = default;
+
+VertexBuffer::VertexBuffer( VertexBuffer&& rhs ) =  default;
+
+VertexBuffer& VertexBuffer::operator=( VertexBuffer&& rhs ) =  default;
+
+void VertexBuffer::SetData( const void* data, std::size_t size )
+{
+  GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
+}
+
+std::size_t VertexBuffer::GetSize() const
+{
+  return  GetImplementation(*this).GetSize();
+}
+
+
+VertexBuffer::VertexBuffer( Internal::VertexBuffer* pointer )
+: BaseHandle( pointer )
+{
+}
+
+} // namespace Dali
similarity index 75%
rename from dali/public-api/rendering/property-buffer.h
rename to dali/public-api/rendering/vertex-buffer.h
index c6037e4..69f46c5 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DALI_PROPERTY_BUFFER_H
-#define DALI_PROPERTY_BUFFER_H
+#ifndef DALI_VERTEX_BUFFER_H
+#define DALI_VERTEX_BUFFER_H
 
 /*
  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
@@ -35,13 +35,13 @@ namespace Dali
 
 namespace Internal DALI_INTERNAL
 {
-class PropertyBuffer;
+class VertexBuffer;
 }
 
 /**
- * @brief PropertyBuffer is a handle to an object that contains a buffer of structured properties.
+ * @brief VertexBuffer is a handle to an object that contains a buffer of structured data.
  *
- * PropertyBuffers can be used to provide data to Geometry objects.
+ * VertexBuffers can be used to provide data to Geometry objects.
  *
  * Example:
  *
@@ -56,7 +56,7 @@ class PropertyBuffer;
  *  Property::Map texturedQuadVertexFormat;
  *  texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
  *  texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- *  PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ *  VertexBuffer texturedQuadVertices = VertexBuffer::New( texturedQuadVertexFormat );
  *  texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
  *
  *  // Create indices
@@ -69,77 +69,76 @@ class PropertyBuffer;
  *
  * @SINCE_1_1.43
  */
-class DALI_CORE_API PropertyBuffer : public BaseHandle
+class DALI_CORE_API VertexBuffer : public BaseHandle
 {
 public:
 
   /**
-   * @brief Creates a PropertyBuffer.
-   * Static property buffers use less memory.
+   * @brief Creates a VertexBuffer.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] bufferFormat Map of names and types that describes the components of the buffer
-   * @return Handle to a newly allocated PropertyBuffer
+   * @return Handle to a newly allocated VertexBuffer
    */
-  static PropertyBuffer New( Dali::Property::Map& bufferFormat );
+  static VertexBuffer New( Dali::Property::Map& bufferFormat );
 
   /**
    * @brief Default constructor, creates an empty handle.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    */
-  PropertyBuffer();
+  VertexBuffer();
 
   /**
    * @brief Destructor.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    */
-  ~PropertyBuffer();
+  ~VertexBuffer();
 
   /**
    * @brief Copy constructor, creates a new handle to the same object.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] handle Handle to an object
    */
-  PropertyBuffer( const PropertyBuffer& handle );
+  VertexBuffer( const VertexBuffer& handle );
 
   /**
    * @brief Downcasts to a property buffer handle.
    * If not, a property buffer the returned property buffer handle is left uninitialized.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] handle Handle to an object
    * @return Property buffer handle or an uninitialized handle
    */
-  static PropertyBuffer DownCast( BaseHandle handle );
+  static VertexBuffer DownCast( BaseHandle handle );
 
   /**
    * @brief Assignment operator, changes this handle to point at the same object.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] handle Handle to an object
    * @return Reference to the assigned object
    */
-  PropertyBuffer& operator=( const PropertyBuffer& handle );
+  VertexBuffer& operator=( const VertexBuffer& handle );
 
   /**
    * @brief Move constructor.
    *
-   * @SINCE_1_9.22
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the moved handle
    */
-  PropertyBuffer( PropertyBuffer&& rhs );
+  VertexBuffer( VertexBuffer&& rhs );
 
   /**
    * @brief Move assignment operator.
    *
-   * @SINCE_1_9.22
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  PropertyBuffer& operator=( PropertyBuffer&& rhs );
+  VertexBuffer& operator=( VertexBuffer&& rhs );
 
   /**
    * @brief Updates the whole buffer information.
@@ -156,10 +155,10 @@ public:
    *   Dali::Vector2 uv;
    * };
    * Vertex vertices[ 10 ] = { ... };
-   * propertyBuffer.SetData( vertices );
+   * vertexBuffer.SetData( vertices );
    * </pre>
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] data A pointer to the data that will be copied to the buffer
    * @param[in] size Number of elements to expand or contract the buffer
    */
@@ -168,7 +167,7 @@ public:
   /**
    * @brief Gets the number of elements in the buffer.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @return Number of elements to expand or contract the buffer
    */
   std::size_t GetSize() const;
@@ -178,10 +177,10 @@ public:
   /**
    * @brief The constructor.
    * @note  Not intended for application developers.
-   * @SINCE_1_1.43
-   * @param[in] pointer A pointer to a newly allocated PropertyBuffer
+   * @SINCE_1_9.27
+   * @param[in] pointer A pointer to a newly allocated VertexBuffer
    */
-  explicit DALI_INTERNAL PropertyBuffer( Internal::PropertyBuffer* pointer );
+  explicit DALI_INTERNAL VertexBuffer( Internal::VertexBuffer* pointer );
 };
 
 /**
@@ -189,4 +188,4 @@ public:
  */
 } // namespace Dali
 
-#endif // DALI_PROPERTY_BUFFER_H
+#endif // DALI_VERTEX_BUFFER_H