atlasDescriptor.mHorizontalStrip = BufferImage::New( blockWidth, SINGLE_PIXEL_PADDING, pixelformat );
atlasDescriptor.mVerticalStrip = BufferImage::New( SINGLE_PIXEL_PADDING, blockHeight - DOUBLE_PIXEL_PADDING, pixelformat );
- memset( atlasDescriptor.mHorizontalStrip.GetBuffer(), 0, atlasDescriptor.mHorizontalStrip.GetBufferSize() );
- memset( atlasDescriptor.mVerticalStrip.GetBuffer(), 0, atlasDescriptor.mVerticalStrip.GetBufferSize() );
+ PixelBuffer* buffer = atlasDescriptor.mHorizontalStrip.GetBuffer();
+ if( buffer == NULL )
+ {
+ DALI_LOG_ERROR("atlasDescriptor.mHorizontalStrip.GetBuffer() returns NULL\n");
+ return 0;
+ }
+ memset( buffer, 0, atlasDescriptor.mHorizontalStrip.GetBufferSize() );
+
+ buffer = atlasDescriptor.mVerticalStrip.GetBuffer();
+ if( buffer == NULL )
+ {
+ DALI_LOG_ERROR("atlasDescriptor.mVerticalStrip.GetBuffer() returns NULL\n");
+ return 0;
+ }
+ memset( buffer, 0, atlasDescriptor.mVerticalStrip.GetBufferSize() );
BufferImage filledPixelImage = BufferImage::New( 1u, 1u, pixelformat );
- memset( filledPixelImage.GetBuffer(), 0xFF, filledPixelImage.GetBufferSize() );
+ buffer = filledPixelImage.GetBuffer();
+ if( buffer == NULL)
+ {
+ DALI_LOG_ERROR("filledPixelImage.GetBuffer() returns NULL\n");
+ return 0;
+ }
+
+ memset( buffer, 0xFF, filledPixelImage.GetBufferSize() );
atlas.Upload( filledPixelImage, 0, 0 );
Sampler sampler = Sampler::New( atlas, "sTexture" );
{
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
+
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
- for( ; i < node.Size(); ++i, ++iter)
+
+ if( array )
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for( ; i < node.Size(); ++i, ++iter)
{
- array->PushBack( childValue );
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ array->PushBack( childValue );
+ }
}
- }
- if( array->Count() == node.Size() )
- {
- done = true;
- }
- else
- {
- done = false;
+ if( array->Count() == node.Size() )
+ {
+ done = true;
+ }
+ else
+ {
+ done = false;
+ }
}
}
break;
{
value = Property::Value(Property::MAP);
Property::Map* map = value.GetMap();
+
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
- for( ; i < node.Size(); ++i, ++iter)
+
+ if( map )
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for( ; i < node.Size(); ++i, ++iter)
{
- map->Insert( (*iter).first, childValue );
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ map->Insert( (*iter).first, childValue );
+ }
}
- }
- if( map->Count() == node.Size() )
- {
- done = true;
- }
- else
- {
- done = false;
+ if( map->Count() == node.Size() )
+ {
+ done = true;
+ }
+ else
+ {
+ done = false;
+ }
}
}
break;
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
- for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter)
+ if( array )
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter)
{
- array->PushBack( childValue );
- done = true;
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ array->PushBack( childValue );
+ done = true;
+ }
}
}
}
{
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
- for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
+
+ if( array )
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
- array->PushBack( childValue );
- done = true;
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ array->PushBack( childValue );
+ done = true;
+ }
}
}
}
{
value = Property::Value(Property::MAP);
Property::Map* map = value.GetMap();
- for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
+
+ if( map )
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
- map->Insert( (*iter).first, childValue );
- done = true;
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ map->Insert( (*iter).first, childValue );
+ done = true;
+ }
}
}
}