2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUiEffects_RendererMemoryTexture2DProperty.h
19 * @brief This is the header file for the MemoryTexture2DProperty class
22 #ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MEMORYTEXTURE2DPROPERTY_H_
23 #define _FUI_EFFECTS_INTERNAL_RENDERER_MEMORYTEXTURE2DPROPERTY_H_
25 #include <renderer/system/FUiEffects_RendererSystemSmartPtr.h>
26 #include <renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.h>
27 #include <renderer/system/FUiEffects_RendererSystemData.h>
29 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer
33 * @class MemoryTexture2DProperty
34 * @brief This class for texture material property, constructed from bitmap located in memory. Only BGRA pixel format.
37 class MemoryTexture2DProperty
38 : public EngineModel::Texture2dProperty
45 MemoryTexture2DProperty(void);
51 ~MemoryTexture2DProperty(void);
53 EngineModel::TextureProperty::InternalFormat::Value GetInternalFormat(void) const
55 return EngineModel::TextureProperty::InternalFormat::RGBA;
58 EngineModel::TextureProperty::DataFormat::Value GetDataFormat(void) const
60 return EngineModel::TextureProperty::DataFormat::RGBA;
63 EngineModel::TextureProperty::DataType::Value GetDataType(void) const
65 return EngineModel::TextureProperty::DataType::UNSIGNED_BYTE;
68 EngineModel::TextureProperty::FilterType::Value GetMinFilter(void) const
70 return EngineModel::TextureProperty::FilterType::LINEAR;
73 EngineModel::TextureProperty::FilterType::Value GetMagFilter(void) const
75 return EngineModel::TextureProperty::FilterType::LINEAR;
78 EngineModel::TextureProperty::WrapType::Value GetWrapS(void) const
80 return EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE;
83 EngineModel::TextureProperty::WrapType::Value GetWrapT(void) const
85 return EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE;
88 EngineModel::TextureProperty::WrapType::Value GetWrapR(void) const
90 return EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE;
93 size_t GetNumMipmaps(void) const
98 void* GetData(size_t aMipNumber)
103 size_t GetWidth(size_t aMipNumber) const
108 size_t GetHeight(size_t aMipNumber) const
113 bool GenerateMipmaps(void) const
120 * Copies bitmap data from specified location
122 * @param [in] ptr Pointer to data location. BGRA format.
123 * @param [in] width Width in pixels
124 * @param [in] height Height in pixels
128 void SetData(const void* ptr, size_t width, size_t height);
133 * Hidden copy constructor
135 MemoryTexture2DProperty(const MemoryTexture2DProperty &rhs);
139 * Hidden assignment operator
141 MemoryTexture2DProperty& operator =(const MemoryTexture2DProperty &rhs);
145 * Gets count of bytes per pixel for current format
147 * @return int Count of bytes per pixel
149 int GetFormatSize(void);
152 System::Data<System::uint8> __data;
157 typedef System::SmartPtr<MemoryTexture2DProperty> MemoryTexture2DPropertyPtr;
159 } } } } // Tizen::Ui::Effects::_EffectRenderer
161 #endif //_FUI_EFFECTS_INTERNAL_RENDERER_MEMORYTEXTURE2DPROPERTY_H_