-#ifndef __DALI_INTERNAL_SHADER_DATA_H__
-#define __DALI_INTERNAL_SHADER_DATA_H__
+#ifndef DALI_INTERNAL_SHADER_DATA_H
+#define DALI_INTERNAL_SHADER_DATA_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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 ShaderData;
-typedef IntrusivePtr<ShaderData> ShaderDataPtr;
+using ShaderDataPtr = IntrusivePtr<ShaderData>;
/**
* ShaderData class.
* Allocate a buffer for the compiled binary bytecode
* @param[in] size The size of the buffer in bytes
*/
- void AllocateBuffer( size_t size )
+ void AllocateBuffer( std::size_t size )
{
mBuffer.Resize( size );
}
* Get the program buffer
* @return reference to the buffer
*/
- size_t GetBufferSize() const
+ std::size_t GetBufferSize() const
{
return mBuffer.Size();
}
* Get the data that the buffer points to
* @return raw pointer to the buffer data
*/
- unsigned char* GetBufferData()
+ uint8_t* GetBufferData()
{
DALI_ASSERT_DEBUG( mBuffer.Size() > 0 );
return &mBuffer[0];
* Get the data that the buffer points to
* @return raw pointer to the buffer data
*/
- Dali::Vector<unsigned char>& GetBuffer()
+ Dali::Vector<uint8_t>& GetBuffer()
{
return mBuffer;
}
private: // Data
- size_t mShaderHash; ///< hash key created with vertex and fragment shader code
- std::string mVertexShader; ///< source code for vertex program
- std::string mFragmentShader; ///< source code for fragment program
- Dali::Shader::Hint::Value mHints; ///< take a hint
- Dali::Vector<unsigned char> mBuffer; ///< buffer containing compiled binary bytecode
+ std::size_t mShaderHash; ///< hash key created with vertex and fragment shader code
+ std::string mVertexShader; ///< source code for vertex program
+ std::string mFragmentShader; ///< source code for fragment program
+ Dali::Shader::Hint::Value mHints; ///< take a hint
+ Dali::Vector<uint8_t> mBuffer; ///< buffer containing compiled binary bytecode
+
};
} // namespace Integration
} // namespace Dali
-#endif // __DALI_INTERNAL_SHADER_DATA_H__
+#endif // DALI_INTERNAL_SHADER_DATA_H