X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fimages%2Fbuffer-image-impl.cpp;h=68c002782f9c3b5647042f3ab138aac5be1f1e89;hb=a167df9844d0a4fb3bab4b6782da4785b614041b;hp=3e2ca4b946a961ef1e198219b467e0e902b9f082;hpb=a758da80cb775422c1467869dbb3adddc98d2d2e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/images/buffer-image-impl.cpp b/dali/internal/event/images/buffer-image-impl.cpp index 3e2ca4b..68c0027 100644 --- a/dali/internal/event/images/buffer-image-impl.cpp +++ b/dali/internal/event/images/buffer-image-impl.cpp @@ -65,7 +65,6 @@ BufferImage::BufferImage(unsigned int width, unsigned int height, Pixel::Format : Image(), mInternalBuffer( NULL ), mExternalBuffer( NULL ), - mResourceClient( NULL ), mBufferSize( 0 ), mByteStride( 0 ), mBytesPerPixel( 0 ), @@ -87,7 +86,6 @@ BufferImage::BufferImage(PixelBuffer* pixBuf, : Image(), mInternalBuffer( NULL ), mExternalBuffer( pixBuf ), - mResourceClient( NULL ), mBufferSize( 0 ), mByteStride( 0 ), mBytesPerPixel( 0 ), @@ -108,8 +106,6 @@ void BufferImage::SetupBuffer( unsigned int width, Pixel::Format pixelformat, unsigned int byteStride ) { - ThreadLocalStorage& tls = ThreadLocalStorage::Get(); - mResourceClient = &tls.GetResourceClient(); mWidth = width; mHeight = height; mPixelFormat = pixelformat; @@ -131,7 +127,7 @@ void BufferImage::Update( const RectArea& updateArea ) { if ( !mTexture ) { - mTexture = NewTexture::New( Dali::TextureType::TEXTURE_2D, mPixelFormat, mWidth, mHeight ); + mTexture = Texture::New( Dali::TextureType::TEXTURE_2D, mPixelFormat, mWidth, mHeight ); } DALI_ASSERT_DEBUG( updateArea.x + updateArea.width <= mWidth && updateArea.y + updateArea.height <= mHeight ); UploadArea( updateArea ); @@ -143,8 +139,8 @@ void BufferImage::UploadArea( const RectArea& area ) mBufferWidth = area.width ? area.width : mWidth; uint32_t bufferHeight = area.height ? area.height : mHeight; - size_t bufferSize = mBytesPerPixel * mBufferWidth * bufferHeight; - unsigned char* buffer = reinterpret_cast< Dali::Integration::PixelBuffer* >( malloc( bufferSize ) ); + uint32_t bufferSize = mBytesPerPixel * mBufferWidth * bufferHeight; + Dali::Integration::PixelBuffer* buffer = reinterpret_cast< Dali::Integration::PixelBuffer* >( malloc( bufferSize ) ); DALI_ASSERT_DEBUG(buffer != 0); // Are we uploading from an external or internal buffer ?