X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fcommon%2Fimage-loader.cpp;h=e8b3b792872f77c76faa3d8b78537898ed6fd9db;hb=c1bb1606717a5a831a0e7bdaca8b4eb86dc5a89e;hp=09c1d0043b3d11f3a766bc4f0f33d45b7d113ead;hpb=6351f46a2ec7a95878d51e851dcc5bd1b96a78e5;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/common/image-loader.cpp b/dali/internal/imaging/common/image-loader.cpp index 09c1d00..e8b3b79 100755 --- a/dali/internal/imaging/common/image-loader.cpp +++ b/dali/internal/imaging/common/image-loader.cpp @@ -33,6 +33,7 @@ #include using namespace Dali::Integration; +using namespace Dali::Internal::Platform; namespace Dali { @@ -45,6 +46,7 @@ namespace Integration::Log::Filter* gLogFilter = Debug::Filter::New( Debug::Concise, false, "LOG_IMAGE_LOADING" ); #endif +static unsigned int gMaxTextureSize = 4096; /** * Enum for file formats, has to be in sync with BITMAP_LOADER_LOOKUP_TABLE @@ -146,10 +148,10 @@ bool GetBitmapLoaderFunctions( FILE *fp, const std::string& filename ) { unsigned char magic[MAGIC_LENGTH]; - size_t read = fread(magic, sizeof(unsigned char), MAGIC_LENGTH, fp); + size_t read = InternalFile::fread(magic, sizeof(unsigned char), MAGIC_LENGTH, fp); // Reset to the start of the file. - if( fseek(fp, 0, SEEK_SET) ) + if( InternalFile::fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); } @@ -234,7 +236,7 @@ bool GetBitmapLoaderFunctions( FILE *fp, } // Reset to the start of the file. - if( fseek(fp, 0, SEEK_SET) ) + if( InternalFile::fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); } @@ -414,6 +416,16 @@ ImageDimensions GetClosestImageSize( Integration::ResourcePointer resourceBuffer return ImageDimensions( width, height ); } +void SetMaxTextureSize( unsigned int size ) +{ + gMaxTextureSize = size; +} + +unsigned int GetMaxTextureSize() +{ + return gMaxTextureSize; +} + } // ImageLoader } // TizenPlatform } // Dali