Commit 465d3a8e629449de946e9541faddec4ee52b7465
1 parent
d989ffd2
Removed BitmapLoader references
Change-Id: I3b5ef31b0f8655a59c14fbabb1fa98c31699ff3c
Showing
3 changed files
with
10 additions
and
19 deletions
examples/cube-transition-effect/cube-transition-effect-example.cpp
| @@ -394,9 +394,9 @@ bool CubeTransitionApp::OnTimerTick() | @@ -394,9 +394,9 @@ bool CubeTransitionApp::OnTimerTick() | ||
| 394 | Texture CubeTransitionApp::LoadStageFillingTexture( const char* filepath ) | 394 | Texture CubeTransitionApp::LoadStageFillingTexture( const char* filepath ) |
| 395 | { | 395 | { |
| 396 | ImageDimensions dimensions( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y ); | 396 | ImageDimensions dimensions( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y ); |
| 397 | - BitmapLoader loader = BitmapLoader::New( filepath, dimensions, FittingMode::SCALE_TO_FILL ); | ||
| 398 | - loader.Load(); | ||
| 399 | - PixelData pixelData = loader.GetPixelData(); | 397 | + Devel::PixelBuffer pixelBuffer = LoadImageFromFile( filepath, dimensions, FittingMode::SCALE_TO_FILL ); |
| 398 | + PixelData pixelData = Devel::PixelBuffer::Convert(pixelBuffer); | ||
| 399 | + | ||
| 400 | Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() ); | 400 | Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() ); |
| 401 | texture.Upload( pixelData ); | 401 | texture.Upload( pixelData ); |
| 402 | return texture; | 402 | return texture; |
examples/renderer-stencil/renderer-stencil-example.cpp
| @@ -17,7 +17,6 @@ | @@ -17,7 +17,6 @@ | ||
| 17 | 17 | ||
| 18 | // EXTERNAL INCLUDES | 18 | // EXTERNAL INCLUDES |
| 19 | #include <dali-toolkit/dali-toolkit.h> | 19 | #include <dali-toolkit/dali-toolkit.h> |
| 20 | -#include <dali/devel-api/adaptor-framework/bitmap-loader.h> | ||
| 21 | 20 | ||
| 22 | // INTERNAL INCLUDES | 21 | // INTERNAL INCLUDES |
| 23 | #include "renderer-stencil-shaders.h" | 22 | #include "renderer-stencil-shaders.h" |
shared/utility.h
| @@ -19,33 +19,25 @@ | @@ -19,33 +19,25 @@ | ||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include <dali/dali.h> | 21 | #include <dali/dali.h> |
| 22 | -#include <dali/devel-api/adaptor-framework/bitmap-loader.h> | ||
| 23 | #include <dali/public-api/rendering/geometry.h> | 22 | #include <dali/public-api/rendering/geometry.h> |
| 24 | #include <dali/public-api/rendering/texture.h> | 23 | #include <dali/public-api/rendering/texture.h> |
| 24 | +#include <dali/devel-api/adaptor-framework/image-loading.h> | ||
| 25 | 25 | ||
| 26 | namespace DemoHelper | 26 | namespace DemoHelper |
| 27 | { | 27 | { |
| 28 | 28 | ||
| 29 | -Dali::PixelData LoadPixelData( const char* imagePath, | ||
| 30 | - Dali::ImageDimensions size, | ||
| 31 | - Dali::FittingMode::Type fittingMode, | ||
| 32 | - Dali::SamplingMode::Type samplingMode ) | ||
| 33 | -{ | ||
| 34 | - Dali::BitmapLoader loader = Dali::BitmapLoader::New( imagePath, size, fittingMode, samplingMode ); | ||
| 35 | - loader.Load(); | ||
| 36 | - return loader.GetPixelData(); | ||
| 37 | -} | ||
| 38 | - | ||
| 39 | Dali::Texture LoadTexture( const char* imagePath, | 29 | Dali::Texture LoadTexture( const char* imagePath, |
| 40 | Dali::ImageDimensions size = Dali::ImageDimensions(), | 30 | Dali::ImageDimensions size = Dali::ImageDimensions(), |
| 41 | Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT, | 31 | Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT, |
| 42 | Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT ) | 32 | Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT ) |
| 43 | { | 33 | { |
| 44 | - Dali::PixelData pixelData = LoadPixelData(imagePath, size, fittingMode, samplingMode); | 34 | + Dali::Devel::PixelBuffer pixelBuffer = LoadImageFromFile(imagePath, size, fittingMode, samplingMode); |
| 45 | Dali::Texture texture = Dali::Texture::New( Dali::TextureType::TEXTURE_2D, | 35 | Dali::Texture texture = Dali::Texture::New( Dali::TextureType::TEXTURE_2D, |
| 46 | - pixelData.GetPixelFormat(), | ||
| 47 | - pixelData.GetWidth(), | ||
| 48 | - pixelData.GetHeight() ); | 36 | + pixelBuffer.GetPixelFormat(), |
| 37 | + pixelBuffer.GetWidth(), | ||
| 38 | + pixelBuffer.GetHeight() ); | ||
| 39 | + | ||
| 40 | + Dali::PixelData pixelData = Dali::Devel::PixelBuffer::Convert(pixelBuffer); | ||
| 49 | texture.Upload( pixelData ); | 41 | texture.Upload( pixelData ); |
| 50 | 42 | ||
| 51 | return texture; | 43 | return texture; |