#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.
#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>
/**
* @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
/**
* 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& );
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
};
/**
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