X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-adaptor-internal%2Fimage-loaders.h;h=fa7fa0d839247dd932fbdb17d3221dc2541bbab3;hb=refs%2Fchanges%2F86%2F165786%2F1;hp=3cf23ae6a53aee36a911232dd6694536c06b7828;hpb=43d62b88c530b72d2d419da81beffbdb13ec25fc;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/automated-tests/src/dali-adaptor-internal/image-loaders.h b/automated-tests/src/dali-adaptor-internal/image-loaders.h index 3cf23ae..fa7fa0d 100644 --- a/automated-tests/src/dali-adaptor-internal/image-loaders.h +++ b/automated-tests/src/dali-adaptor-internal/image-loaders.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -20,7 +20,7 @@ #include #include -#include "platform-abstractions/tizen/resource-loader/resource-loading-client.h" +#include "platform-abstractions/tizen/image-loaders/image-loader-input.h" // Simple structure to close the file when finished with it. struct AutoCloseFile @@ -66,7 +66,7 @@ struct ImageDetails unsigned int reportedWidth; unsigned int reportedHeight; unsigned int refBufferSize; - Dali::PixelBuffer* const refBuffer; + Dali::PixelBuffer* refBuffer; private: @@ -82,8 +82,8 @@ private: */ struct LoadFunctions { - typedef bool (*LoadBitmapFunction)(FILE*, Dali::Integration::Bitmap&, Dali::ImageAttributes&, const Dali::TizenPlatform::ResourceLoadingClient& client); - typedef bool (*LoadBitmapHeaderFunction)(FILE*, const Dali::ImageAttributes& attrs, unsigned int& width, unsigned int& height ); + typedef bool (*LoadBitmapFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, Dali::Integration::Bitmap& ); + typedef bool (*LoadBitmapHeaderFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, unsigned int& width, unsigned int& height ); LoadFunctions( LoadBitmapHeaderFunction _header, LoadBitmapFunction _loader ); LoadBitmapHeaderFunction header; @@ -95,10 +95,20 @@ struct LoadFunctions * Use this method to test the header and and bitmap loading of each image. * The loaded bitmap is then checked with the reference bitmap in ImageDetails. * - * @param[in] image The image details. - * @param[in] functions The loader functions that need to be called. + * @param[in] image The image details. + * @param[in] functions The loader functions that need to be called. + * @param[in] bitmapProfile Whether or not the bitmap is raw */ -void TestImageLoading( const ImageDetails& image, const LoadFunctions& functions ); +void TestImageLoading( const ImageDetails& image, const LoadFunctions& functions, Dali::Integration::Bitmap::Profile bitmapProfile = Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS ); + +/** + * Helper method to compare the resultant loaded image data of the specified image with a golden master data. + * + * @param[in] image The image to load + * @param[in] functions The functions to use to load the image + * @param[in] master Golden master data to compare the resultant loaded image with + */ +void CompareLoadedImageData( const ImageDetails& image, const LoadFunctions& functions, const uint32_t* master ); /** * Helper function which should be used when first creating a reference buffer file.