}
}
- ResourcePointer LoadResourceSynchronously( const Integration::ResourceType& resourceType, const std::string& resourcePath )
- {
- ResourcePointer ptr;
- ResourceRequesterBase* requester = GetRequester(resourceType.id);
- if( requester )
- {
- ptr = requester->LoadResourceSynchronously( resourceType, resourcePath );
- }
- return ptr;
- }
-
void SaveResource(const ResourceRequest& request)
{
ResourceRequesterBase* requester = GetRequester( request.GetType()->id );
bool IsLoading()
{
// TODO - not used - remove?
+ DALI_ASSERT_DEBUG( 0 == "IsLoading() Is not implemented so don't call it." );
return true;
}
}
}
- void GetClosestImageSize( const std::string& filename,
- const ImageAttributes& attributes,
- Vector2& closestSize )
- {
- ResourceRequesterBase* requester = GetRequester(ResourceBitmap);
- ResourceBitmapRequester* bitmapRequester = dynamic_cast<ResourceBitmapRequester*>(requester);
- if( bitmapRequester != NULL )
- {
- bitmapRequester->GetClosestImageSize( filename, attributes, closestSize );
- }
- }
-
- void GetClosestImageSize( ResourcePointer resourceBuffer,
- const ImageAttributes& attributes,
- Vector2& closestSize )
- {
- ResourceRequesterBase* requester = GetRequester(ResourceBitmap);
- ResourceBitmapRequester* bitmapRequester = dynamic_cast<ResourceBitmapRequester*>(requester);
- if( bitmapRequester != NULL )
- {
- bitmapRequester->GetClosestImageSize( resourceBuffer, attributes, closestSize );
- }
- }
-
void AddPartiallyLoadedResource( LoadedResource& resource)
{
// Lock the LoadedQueue to store the loaded resource
mImpl->LoadResource(request);
}
-ResourcePointer ResourceLoader::LoadResourceSynchronously(const Integration::ResourceType& resourceType, const std::string& resourcePath)
-{
- return mImpl->LoadResourceSynchronously( resourceType, resourcePath );
-}
-
void ResourceLoader::SaveResource(const ResourceRequest& request)
{
mImpl->SaveResource(request);
return mImpl->IsLoading();
}
-void ResourceLoader::GetClosestImageSize( const std::string& filename,
- const ImageAttributes& attributes,
- Vector2& closestSize )
-{
- mImpl->GetClosestImageSize( filename, attributes, closestSize );
-}
-
-void ResourceLoader::GetClosestImageSize( ResourcePointer resourceBuffer,
- const ImageAttributes& attributes,
- Vector2& closestSize )
-{
- mImpl->GetClosestImageSize( resourceBuffer, attributes, closestSize );
-}
-
-
-const std::string& ResourceLoader::GetFontFamilyForChars( const TextArray& charsRequested )
+const std::string& ResourceLoader::GetFontFamilyForChars( const Integration::TextArray& charsRequested )
{
return mImpl->mFontController->GetFontFamilyForChars( charsRequested ).first;
}
-bool ResourceLoader::AllGlyphsSupported( const std::string& fontFamily, const std::string& fontStyle, const TextArray& charsRequested )
+bool ResourceLoader::AllGlyphsSupported( const std::string& fontFamily, const std::string& fontStyle, const Integration::TextArray& charsRequested )
{
// At this point fontFamily and fontStyle must have been validated.
glyphMetrics.yPosition = requestedCharacters[n].yPosition;
// create a new bitmap, and copy in the data
- BitmapPtr bitmapData ( Integration::Bitmap::New(Bitmap::BITMAP_2D_PACKED_PIXELS, true) );
- DALI_ASSERT_ALWAYS( data.length == DISTANCE_FIELD_SIZE * DISTANCE_FIELD_SIZE );
+ BitmapPtr bitmapData ( Integration::Bitmap::New(Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::DISCARD) );
// assign the data
bitmapData->GetPackedPixelsProfile()->AssignBuffer( Pixel::A8, data.data, DISTANCE_FIELD_SIZE * DISTANCE_FIELD_SIZE, DISTANCE_FIELD_SIZE, DISTANCE_FIELD_SIZE );
if( NULL != slpFace )
{
image = GetGlyphBitmap( slpFace->face, character );
+ delete slpFace;
}
return image;