BufferImage Usage Removal
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-adaptor-internal / image-loaders.cpp
old mode 100644 (file)
new mode 100755 (executable)
index faebbf3..7d05057
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -77,8 +77,8 @@ void ImageDetails::LoadBuffer()
     fseek( fp, 0, SEEK_END );
     refBufferSize = ftell( fp );
     fseek( fp, 0, SEEK_SET );
-    refBuffer = reinterpret_cast<Dali::PixelBuffer*>( malloc( refBufferSize ) );
-    fread( refBuffer, sizeof( Dali::PixelBuffer ), refBufferSize, fp );
+    refBuffer = reinterpret_cast<Dali::Integration::PixelBuffer*>( malloc( refBufferSize ) );
+    fread( refBuffer, sizeof( Dali::Integration::PixelBuffer ), refBufferSize, fp );
   }
 }
 
@@ -98,7 +98,7 @@ void TestImageLoading( const ImageDetails& image, const LoadFunctions& functions
   // Check the header file.
 
   unsigned int width(0), height(0);
-  const Dali::TizenPlatform::ImageLoader::Input input( fp );
+  const Dali::ImageLoader::Input input( fp );
   DALI_TEST_CHECK( functions.header( input, width, height ) );
 
   DALI_TEST_EQUALS( width,  image.reportedWidth,  TEST_LOCATION );
@@ -115,8 +115,8 @@ void TestImageLoading( const ImageDetails& image, const LoadFunctions& functions
   DALI_TEST_EQUALS( image.height, bitmap.GetHeight(), TEST_LOCATION );
 
   // Compare buffer generated with reference buffer.
-  Dali::PixelBuffer* bufferPtr( bitmap.GetBuffer() );
-  Dali::PixelBuffer* refBufferPtr( image.refBuffer );
+  Dali::Integration::PixelBuffer* bufferPtr( bitmap.GetBuffer() );
+  Dali::Integration::PixelBuffer* refBufferPtr( image.refBuffer );
   for ( unsigned int i = 0; i < image.refBufferSize; ++i, ++bufferPtr, ++refBufferPtr )
   {
     if( *bufferPtr != *refBufferPtr )
@@ -136,7 +136,7 @@ void CompareLoadedImageData( const ImageDetails& image, const LoadFunctions& fun
 
   // Check the header file.
   unsigned int width = 0, height = 0;
-  const Dali::TizenPlatform::ImageLoader::Input input( filePointer );
+  const Dali::ImageLoader::Input input( filePointer );
   DALI_TEST_CHECK( functions.header( input, width, height ) );
 
   DALI_TEST_EQUALS( width,  image.reportedWidth,  TEST_LOCATION );
@@ -157,7 +157,7 @@ void CompareLoadedImageData( const ImageDetails& image, const LoadFunctions& fun
   const unsigned int bytesPerPixel = Pixel::GetBytesPerPixel( pixelFormat );
 
   // Compare buffer generated with reference buffer.
-  Dali::PixelBuffer* pBitmapData( bitmap.GetBuffer() );
+  Dali::Integration::PixelBuffer* pBitmapData( bitmap.GetBuffer() );
   const uint32_t* pMaster( master );
 
   // Loop through each pixel in the bitmap.
@@ -181,11 +181,11 @@ void DumpImageBufferToTempFile( std::string filename, std::string targetFilename
   AutoCloseFile autoClose( fp );
 
   Dali::Devel::PixelBuffer bitmap;
-  const Dali::TizenPlatform::ImageLoader::Input input( fp );
+  const Dali::ImageLoader::Input input( fp );
 
   DALI_TEST_CHECK( functions.loader( input, bitmap ) );
 
-  Dali::PixelBuffer* bufferPtr( bitmap.GetBuffer() );
+  Dali::Integration::PixelBuffer* bufferPtr( bitmap.GetBuffer() );
 
   FILE* writeFp = fopen( targetFilename.c_str(), "wb" );
   AutoCloseFile autoCloseWrite( writeFp );