X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=platform-abstractions%2Ftizen%2Fimage-loaders%2Floader-ktx.cpp;h=fc671049d89d7418c92362342db92ef935712397;hb=f4b05fe51ddba1d7d2035103ef3cfcd1d4741d3c;hp=d39c361ec812fd4945511b12774fac011d67807c;hpb=78a2c1b92f3933c6441e571f6fa7f241012118db;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/platform-abstractions/tizen/image-loaders/loader-ktx.cpp b/platform-abstractions/tizen/image-loaders/loader-ktx.cpp index d39c361..fc67104 100755 --- a/platform-abstractions/tizen/image-loaders/loader-ktx.cpp +++ b/platform-abstractions/tizen/image-loaders/loader-ktx.cpp @@ -19,19 +19,13 @@ #include "loader-ktx.h" // EXTERNAL INCLUDES -#include -#include #include -#include #include #include -#include -#include +#include namespace Dali { -using Integration::Bitmap; -using Dali::Integration::PixelBuffer; namespace TizenPlatform { @@ -538,7 +532,7 @@ bool LoadKtxHeader( const ImageLoader::Input& input, unsigned int& width, unsign } // File loading API entry-point: -bool LoadBitmapFromKtx( const ImageLoader::Input& input, Integration::Bitmap& bitmap ) +bool LoadBitmapFromKtx( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap ) { DALI_COMPILE_TIME_ASSERT( sizeof(Byte) == 1); DALI_COMPILE_TIME_ASSERT( sizeof(uint32_t) == 4); @@ -592,7 +586,9 @@ bool LoadBitmapFromKtx( const ImageLoader::Input& input, Integration::Bitmap& bi } // Load up the image bytes: - PixelBuffer* const pixels = bitmap.GetCompressedProfile()->ReserveBufferOfSize( pixelFormat, width, height, imageByteCount ); + bitmap = Dali::Devel::PixelBuffer::New(width, height, pixelFormat); + auto pixels = bitmap.GetBuffer(); + if(!pixels) { DALI_LOG_ERROR( "Unable to reserve a pixel buffer to load the requested bitmap into.\n" );