From: David Steele Date: Fri, 23 Jun 2017 16:02:08 +0000 (+0100) Subject: Removed BitmapLoader references X-Git-Tag: dali_1.2.46~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-demo.git;a=commitdiff_plain;h=465d3a8e629449de946e9541faddec4ee52b7465 Removed BitmapLoader references Change-Id: I3b5ef31b0f8655a59c14fbabb1fa98c31699ff3c --- diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index 5f338e4..8d8acbd 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -394,9 +394,9 @@ bool CubeTransitionApp::OnTimerTick() Texture CubeTransitionApp::LoadStageFillingTexture( const char* filepath ) { ImageDimensions dimensions( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y ); - BitmapLoader loader = BitmapLoader::New( filepath, dimensions, FittingMode::SCALE_TO_FILL ); - loader.Load(); - PixelData pixelData = loader.GetPixelData(); + Devel::PixelBuffer pixelBuffer = LoadImageFromFile( filepath, dimensions, FittingMode::SCALE_TO_FILL ); + PixelData pixelData = Devel::PixelBuffer::Convert(pixelBuffer); + Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() ); texture.Upload( pixelData ); return texture; diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp index e16cc48..55939d5 100644 --- a/examples/renderer-stencil/renderer-stencil-example.cpp +++ b/examples/renderer-stencil/renderer-stencil-example.cpp @@ -17,7 +17,6 @@ // EXTERNAL INCLUDES #include -#include // INTERNAL INCLUDES #include "renderer-stencil-shaders.h" diff --git a/shared/utility.h b/shared/utility.h index 76a814b..3ecab6d 100644 --- a/shared/utility.h +++ b/shared/utility.h @@ -19,33 +19,25 @@ */ #include -#include #include #include +#include namespace DemoHelper { -Dali::PixelData LoadPixelData( const char* imagePath, - Dali::ImageDimensions size, - Dali::FittingMode::Type fittingMode, - Dali::SamplingMode::Type samplingMode ) -{ - Dali::BitmapLoader loader = Dali::BitmapLoader::New( imagePath, size, fittingMode, samplingMode ); - loader.Load(); - return loader.GetPixelData(); -} - Dali::Texture LoadTexture( const char* imagePath, Dali::ImageDimensions size = Dali::ImageDimensions(), Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT, Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT ) { - Dali::PixelData pixelData = LoadPixelData(imagePath, size, fittingMode, samplingMode); + Dali::Devel::PixelBuffer pixelBuffer = LoadImageFromFile(imagePath, size, fittingMode, samplingMode); Dali::Texture texture = Dali::Texture::New( Dali::TextureType::TEXTURE_2D, - pixelData.GetPixelFormat(), - pixelData.GetWidth(), - pixelData.GetHeight() ); + pixelBuffer.GetPixelFormat(), + pixelBuffer.GetWidth(), + pixelBuffer.GetHeight() ); + + Dali::PixelData pixelData = Dali::Devel::PixelBuffer::Convert(pixelBuffer); texture.Upload( pixelData ); return texture;