X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fcommon%2Floader-astc.cpp;h=67200822b29fd392da9e3f13b291f203629d3605;hb=c1bb1606717a5a831a0e7bdaca8b4eb86dc5a89e;hp=ed13b8e3e8cd5f2688e68ea9714e6d19020ad3fa;hpb=46ffc1be2eab9668c242ab02751d3c0950707eb0;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/common/loader-astc.cpp b/dali/internal/imaging/common/loader-astc.cpp old mode 100644 new mode 100755 index ed13b8e..6720082 --- a/dali/internal/imaging/common/loader-astc.cpp +++ b/dali/internal/imaging/common/loader-astc.cpp @@ -26,6 +26,10 @@ #include #include +#include + +using namespace Dali::Internal::Platform; + namespace Dali { namespace TizenPlatform @@ -120,7 +124,7 @@ bool LoadAstcHeader( FILE * const filePointer, unsigned int& width, unsigned int { // Pull the bytes of the file header in as a block: const unsigned int readLength = sizeof( AstcFileHeader ); - if( fread( &fileHeader, 1, readLength, filePointer ) != readLength ) + if( InternalFile::fread( &fileHeader, 1, readLength, filePointer ) != readLength ) { return false; } @@ -161,14 +165,14 @@ bool LoadAstcHeader( FILE * const filePointer, unsigned int& width, unsigned int // File loading API entry-point: -bool LoadAstcHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height ) +bool LoadAstcHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height ) { AstcFileHeader fileHeader; return LoadAstcHeader( input.file, width, height, fileHeader ); } // File loading API entry-point: -bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap ) +bool LoadBitmapFromAstc( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap ) { FILE* const filePointer = input.file; if( !filePointer ) @@ -196,20 +200,20 @@ bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuff } // Retrieve the file size. - if( fseek( filePointer, 0L, SEEK_END ) ) + if( InternalFile::fseek( filePointer, 0L, SEEK_END ) ) { DALI_LOG_ERROR( "Could not seek through file.\n" ); return false; } - off_t fileSize = ftell( filePointer ); + off_t fileSize = InternalFile::ftell( filePointer ); if( fileSize == -1L ) { DALI_LOG_ERROR( "Could not determine ASTC file size.\n" ); return false; } - if( fseek( filePointer, sizeof( AstcFileHeader ), SEEK_SET ) ) + if( InternalFile::fseek( filePointer, sizeof( AstcFileHeader ), SEEK_SET ) ) { DALI_LOG_ERROR( "Could not seek through file.\n" ); return false; @@ -239,7 +243,7 @@ bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuff } // Load the image data. - const size_t bytesRead = fread( pixels, 1, imageByteCount, filePointer ); + const size_t bytesRead = InternalFile::fread( pixels, 1, imageByteCount, filePointer ); // Check the size of loaded data is what we expected. if( bytesRead != imageByteCount )