[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / dali / internal / event / common / property-buffer-impl.h
index 9148856..2f57eaf 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_PROPERTY_BUFFER_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -23,7 +23,6 @@
 #include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/property-map.h> // Dali::Property::Map
-#include <dali/devel-api/object/property-buffer.h> // Dali::PropertyBuffer
 #include <dali/internal/event/common/event-thread-services.h>
 #include <dali/internal/render/renderers/render-property-buffer.h>
 
@@ -46,31 +45,17 @@ public:
   /**
    * @copydoc PropertBuffer::New()
    */
-  static PropertyBufferPtr New();
-
-  /**
-   * @copydoc PropertBuffer::SetSize()
-   */
-  void SetSize( std::size_t size );
-
-  /**
-   * @copydoc PropertBuffer::GetSize()
-   */
-  std::size_t GetSize() const;
+  static PropertyBufferPtr New( Dali::Property::Map& format );
 
   /**
    * @copydoc PropertBuffer::SetData()
    */
-  void SetData( const void* data );
+  void SetData( const void* data, uint32_t size );
 
   /**
-   * @brief Set the format of the PropertyBuffer
-   *
-   * @pre Has not been set yet
-   *
-   * @param[in] format of the PropertyBuffer
+   * @copydoc PropertBuffer::GetSize()
    */
-  void SetFormat( Dali::Property::Map& format );
+  uint32_t GetSize() const;
 
 public: // Default property extensions from Object
 
@@ -96,17 +81,7 @@ private: // implementation
   /**
    * Second stage initialization
    */
-  void Initialize();
-
-  /**
-   * Update the buffer when the format changes
-   */
-  void FormatChanged();
-
-  /**
-   * Update the buffer when the size changes
-   */
-  void SizeChanged();
+  void Initialize( Dali::Property::Map& format );
 
 private: // unimplemented methods
   PropertyBuffer( const PropertyBuffer& );
@@ -114,12 +89,9 @@ private: // unimplemented methods
 
 private: // data
   EventThreadServices& mEventThreadServices;    ///<Used to send messages to the render thread via update thread
-  Render::PropertyBuffer* mRenderObject; ///<Render side object
-
-  Property::Map mFormat;  ///< Format of the property buffer
-  const Render::PropertyBuffer::Format* mBufferFormat;  ///< Metadata for the format of the property buffer
-  unsigned int mSize; ///< Number of elements in the buffer
-  Dali::Vector< char > mBuffer; // Data of the property-buffer
+  Render::PropertyBuffer* mRenderObject;        ///<Render side object
+  uint32_t mBufferFormatSize;
+  uint32_t mSize; ///< Number of elements in the buffer
 };
 
 /**
@@ -140,7 +112,7 @@ template<> struct PropertyImplementationType< Property::MATRIX > { typedef Matri
 template<> struct PropertyImplementationType< Property::RECTANGLE > { typedef Rect<int> Type; };
 template<> struct PropertyImplementationType< Property::ROTATION > { typedef Quaternion Type; };
 
-unsigned int GetPropertyImplementationSize( Property::Type& propertyType );
+uint32_t GetPropertyImplementationSize( Property::Type& propertyType );
 
 } // namespace Internal