Dali 3D User Interface Engine
Namespaces | Functions
utc-Dali-ImageOperations.cpp File Reference
#include <dali-test-suite-utils.h>
#include "platform-abstractions/portable/image-operations.h"
#include <dali/devel-api/common/ref-counted-dali-vector.h>
#include <sys/mman.h>
#include <unistd.h>
Include dependency graph for utc-Dali-ImageOperations.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{utc-Dali-ImageOperations.cpp}
 

Functions

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomInRange (uint32_t max)
 Generate a random integer between zero and the parameter passed in. More...
 
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomComponent8 ()
 Random number representable in an 8 bit color component. More...
 
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomComponent5 ()
 Random number representable in a 5 bit color component. More...
 
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomComponent6 ()
 Random number representable in a 6 bit color component. More...
 
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::PixelRGBA8888 (uint32_t r, uint32_t g, uint32_t b, uint32_t a)
 RGBA8888 Pixels from separate color components. More...
 
uint16_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::PixelRGB565 (uint32_t r, uint32_t g, uint32_t b)
 RGB565 Pixels from color components in the low bits of passed-in words. More...
 
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomPixelRGBA8888 ()
 RGBA8888 Pixels with random color components. More...
 
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::HashPixels (const uint32_t *const pixels, unsigned int numPixels)
 Return a hash over a set of pixels. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTestsRGBA8888 (size_t scanlineLength, Dali::Vector< uint32_t > &scanline, Dali::Vector< uint32_t > &reference)
 Build some dummy scanlines to exercise scanline averaging code on. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTestsRGB565 (size_t scanlineLength, Dali::Vector< uint16_t > &scanline, Dali::Vector< uint16_t > &reference)
 Build some dummy scanlines to exercise scanline averaging code on. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTests2Bytes (size_t scanlineLength, Dali::Vector< uint8_t > &scanline, Dali::Vector< uint8_t > &reference)
 Build some dummy scanlines to exercise scanline averaging code on. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTests1Byte (size_t scanlineLength, Dali::Vector< uint8_t > &scanline, Dali::Vector< uint8_t > &reference)
 Build some dummy 1 byte per pixel scanlines to exercise scanline averaging code on. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlinesRGBA8888 (size_t scanlineLength, Dali::Vector< uint32_t > &scanline1, Dali::Vector< uint32_t > &scanline2, Dali::Vector< uint32_t > &reference, Dali::Vector< uint32_t > &output)
 Build some dummy scanlines to exercise vertical averaging code on. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::MatchScanlinesRGBA8888 (Dali::Vector< uint32_t > &reference, Dali::Vector< uint32_t > &output, size_t &numMatches, const char *const location)
 Compares a scanline of interest to a reference, testing each pixel is the same. More...
 
int UtcDaliImageOperationsAverageComponent (void)
 Test component averaging code. More...
 
int UtcDaliImageOperationsAveragePixelRGBA8888 (void)
 Test Pixel averaging code. More...
 
int UtcDaliImageOperationsAveragePixelRGB565 (void)
 Test RGBA565 pixel averaging function. More...
 
void TestDownscaledBitmapHasRightDimensionsAndFormat (Pixel::Format format, uint32_t sourceDimension, uint32_t targetDimension, uint32_t expectedDimension, const char *const location)
 Build a square bitmap, downscale it and assert the resulting bitmap has the right dimensions. More...
 
int UtcDaliImageOperationsDownscaleBitmap (void)
 Test the top-level function for reducing the dimension of a bitmap, feeding it each of the five pixel formats that are output by image loaders. More...
 
int UtcDaliImageOperationsDownscaleInPlacePow2RGB888 (void)
 Test downscaling of RGB888 images as raw pixel arrays. More...
 
void TestDownscaleOutputsExpectedDimensionsRGBA8888 (uint32_t pixels[], unsigned inputWidth, unsigned inputHeight, unsigned int desiredWidth, unsigned int desiredHeight, unsigned int expectedWidth, unsigned int expectedHeight, const char *const location)
 Test that resizing RGBA8888 images as raw pixel arrays produces a result of the correct dimensions. More...
 
void TestDownscaleOutputsExpectedDimensionsRGB565 (uint16_t pixels[], unsigned inputWidth, unsigned inputHeight, unsigned int desiredWidth, unsigned int desiredHeight, unsigned int expectedWidth, unsigned int expectedHeight, const char *const location)
 Test that resizing RGB565 images as raw pixel arrays produces a result of the correct dimensions. More...
 
void TestDownscaleOutputsExpectedDimensions2ComponentPair (uint8_t pixels[], unsigned inputWidth, unsigned inputHeight, unsigned int desiredWidth, unsigned int desiredHeight, unsigned int expectedWidth, unsigned int expectedHeight, const char *const location)
 Test that resizing 2-byte-per-pixel images as raw pixel arrays produces a result of the correct dimensions. More...
 
void TestDownscaleOutputsExpectedDimensionsSingleComponent (uint8_t pixels[], unsigned inputWidth, unsigned inputHeight, unsigned int desiredWidth, unsigned int desiredHeight, unsigned int expectedWidth, unsigned int expectedHeight, const char *const location)
 Test that resizing single-byte-per-pixel images as raw pixel arrays produces a result of the correct dimensions. More...
 
int UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888 (void)
 Test downscaling of RGBA8888 images in raw image arrays. More...
 
int UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888Nops (void)
 Test downscalings of RGBA8888 images in raw image arrays that should have no effect on the input. More...
 
int UtcDaliImageOperationsDownscaleInPlacePow2RGB565 (void)
 Do additional downscaling testing using RGB565 images in raw image arrays to shake out differences relating to the pixel format. More...
 
int UtcDaliImageOperationsDownscaleInPlacePow2ComponentPair (void)
 Do additional downscaling testing using 2-byte-per-pixel images in raw image arrays to shake out differences relating to the pixel format. More...
 
int UtcDaliImageOperationsDownscaleInPlacePow2SingleBytePerPixel (void)
 Do additional downscaling testing using 1-byte-per-pixel images in raw image arrays to shake out differences relating to the pixel format. More...
 
int UtcDaliImageOperationsHalveScanlineInPlaceRGB888 (void)
 Test the function for averaging pairs of pixels on a scanline. More...
 
int UtcDaliImageOperationsHalveScanlineInPlaceRGBA8888 (void)
 Test the function for averaging pairs of pixels on a scanline. More...
 
int UtcDaliImageOperationsHalveScanlineInPlaceRGB565 (void)
 Test the function for averaging pairs of pixels on a scanline. More...
 
int UtcDaliImageOperationsHalveScanlineInPlace2Bytes (void)
 Test the function for averaging pairs of pixels on a scanline. More...
 
int UtcDaliImageOperationsHalveScanlineInPlace1Byte (void)
 Test the function for averaging pairs of pixels on a scanline. More...
 
int UtcDaliImageOperationsAverageScanlines1 (void)
 Test the function for averaging vertically-adjacent pairs of single-byte-per-pixel pixels on a scanline. More...
 
int UtcDaliImageOperationsAverageScanlines2 (void)
 Test the function for averaging vertically-adjacent pairs of 2-byte-per-pixel pixels on a scanline. More...
 
int UtcDaliImageOperationsAverageScanlines3 (void)
 Test the function for averaging vertically-adjacent pairs of RGB888 pixels on a scanline. More...
 
int UtcDaliImageOperationsAverageScanlinesRGBA8888 (void)
 Test the function for averaging vertically-adjacent pairs of RGBA8888 pixels on a scanline. More...
 
int UtcDaliImageOperationsAverageScanlinesRGB565 (void)
 Test the function for averaging vertically-adjacent pairs of RGB565 pixels on a scanline. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeSingleColorImageRGBA8888 (unsigned int width, unsigned int height, uint32_t *inputImage)
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeGuardedOutputImageRGBA8888 (unsigned int desiredWidth, unsigned int desiredHeight, uint32_t *&outputBuffer, uint32_t *&outputImage)
 Allocate an image buffer with protected pages to top and tail it and SEGV if an operation strays into them. More...
 
uint32_t * anonymous_namespace{utc-Dali-ImageOperations.cpp}::AllocateReadOnlyPagesRGBA (unsigned int numPixels)
 Allocate a buffer of pages that are read-only, that is big enough for the number of pixels passed-in. More...
 
void anonymous_namespace{utc-Dali-ImageOperations.cpp}::FreeReadOnlyPagesRGBA (uint32_t *pages, unsigned int numPixels)
 Free a buffer of pages that are read-only. More...
 
Dali::IntrusivePtr
< Dali::RefCountedVector
< uint32_t > > 
anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeCheckerboardImageRGBA8888 (unsigned int width, unsigned int height, unsigned int checkerSize)
 
int UtcDaliImageOperationsPointSampleRGBA888InBounds (void)
 Test that a scaling doesn't stray outside the bounds of the destination image. More...
 
int UtcDaliImageOperationsPointSampleCheckerboardRGBA888 (void)
 Test the right pixels are generated when downsampling a checkerboard into a small image. More...
 
int UtcDaliImageOperationsPointSampleRGBA888PixelsCorrectColor (void)
 Test that a scaling preserves input color in destination image. More...
 
int UtcDaliImageOperationsPointSampleRGBA888ScaleToSinglePixel (void)
 Test that scaling down to a 1x1 image works. More...
 
int UtcDaliImageOperationsPointSampleRGBA888ScaleToZeroDims (void)
 Test that downsampling to 0 - area images is a NOP and does not modify the destination. More...
 
int UtcDaliImageOperationsPointSampleRGB88InBounds (void)
 Test that a scaling doesn't stray outside the bounds of the destination image. More...
 
int UtcDaliImageOperationsUint16Pair (void)
 Test the small int (x,y) tuple. More...
 
int UtcDaliImageOperationsBilinearFilter1BPP (void)
 Test the four-tap linear blending for single-byte modes. More...
 

Function Documentation

void TestDownscaledBitmapHasRightDimensionsAndFormat ( Pixel::Format  format,
uint32_t  sourceDimension,
uint32_t  targetDimension,
uint32_t  expectedDimension,
const char *const  location 
)

Build a square bitmap, downscale it and assert the resulting bitmap has the right dimensions.

Definition at line 350 of file utc-Dali-ImageOperations.cpp.

References Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, Dali::SamplingMode::BOX, DALI_TEST_EQUALS(), Dali::Internal::Platform::DownscaleBitmap(), Dali::Integration::Bitmap::New(), Dali::ResourcePolicy::OWNED_DISCARD, and Dali::FittingMode::SHRINK_TO_FIT.

Referenced by UtcDaliImageOperationsDownscaleBitmap().

Here is the call graph for this function:

Here is the caller graph for this function:

void TestDownscaleOutputsExpectedDimensions2ComponentPair ( uint8_t  pixels[],
unsigned  inputWidth,
unsigned  inputHeight,
unsigned int  desiredWidth,
unsigned int  desiredHeight,
unsigned int  expectedWidth,
unsigned int  expectedHeight,
const char *const  location 
)

Test that resizing 2-byte-per-pixel images as raw pixel arrays produces a result of the correct dimensions.

Definition at line 543 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, DALI_TEST_EQUALS(), and Dali::Internal::Platform::DownscaleInPlacePow2ComponentPair().

Referenced by UtcDaliImageOperationsDownscaleInPlacePow2ComponentPair().

Here is the call graph for this function:

Here is the caller graph for this function:

void TestDownscaleOutputsExpectedDimensionsRGB565 ( uint16_t  pixels[],
unsigned  inputWidth,
unsigned  inputHeight,
unsigned int  desiredWidth,
unsigned int  desiredHeight,
unsigned int  expectedWidth,
unsigned int  expectedHeight,
const char *const  location 
)

Test that resizing RGB565 images as raw pixel arrays produces a result of the correct dimensions.

Definition at line 527 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, DALI_TEST_EQUALS(), and Dali::Internal::Platform::DownscaleInPlacePow2RGB565().

Referenced by UtcDaliImageOperationsDownscaleInPlacePow2RGB565().

Here is the call graph for this function:

Here is the caller graph for this function:

void TestDownscaleOutputsExpectedDimensionsRGBA8888 ( uint32_t  pixels[],
unsigned  inputWidth,
unsigned  inputHeight,
unsigned int  desiredWidth,
unsigned int  desiredHeight,
unsigned int  expectedWidth,
unsigned int  expectedHeight,
const char *const  location 
)

Test that resizing RGBA8888 images as raw pixel arrays produces a result of the correct dimensions.

Definition at line 511 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, DALI_TEST_EQUALS(), and Dali::Internal::Platform::DownscaleInPlacePow2RGBA8888().

Referenced by UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888(), and UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888Nops().

Here is the call graph for this function:

Here is the caller graph for this function:

void TestDownscaleOutputsExpectedDimensionsSingleComponent ( uint8_t  pixels[],
unsigned  inputWidth,
unsigned  inputHeight,
unsigned int  desiredWidth,
unsigned int  desiredHeight,
unsigned int  expectedWidth,
unsigned int  expectedHeight,
const char *const  location 
)

Test that resizing single-byte-per-pixel images as raw pixel arrays produces a result of the correct dimensions.

Definition at line 559 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, DALI_TEST_EQUALS(), and Dali::Internal::Platform::DownscaleInPlacePow2SingleBytePerPixel().

Referenced by UtcDaliImageOperationsDownscaleInPlacePow2SingleBytePerPixel().

Here is the call graph for this function:

Here is the caller graph for this function:

int UtcDaliImageOperationsAverageComponent ( void  )

Test component averaging code.

Definition at line 301 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::AverageComponent(), DALI_TEST_EQUALS(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsAveragePixelRGB565 ( void  )

Test RGBA565 pixel averaging function.

Definition at line 333 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::AveragePixelRGB565(), DALI_TEST_EQUALS(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsAveragePixelRGBA8888 ( void  )

Test Pixel averaging code.

Definition at line 320 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::AveragePixelRGBA8888(), DALI_TEST_EQUALS(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsAverageScanlines1 ( void  )

Test the function for averaging vertically-adjacent pairs of single-byte-per-pixel pixels on a scanline.

Definition at line 945 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::AverageScanlines1(), Dali::VectorBase::Capacity(), DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::MatchScanlinesRGBA8888(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlinesRGBA8888(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsAverageScanlines2 ( void  )

Test the function for averaging vertically-adjacent pairs of 2-byte-per-pixel pixels on a scanline.

Definition at line 979 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::AverageScanlines2(), Dali::VectorBase::Capacity(), DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::MatchScanlinesRGBA8888(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlinesRGBA8888(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsAverageScanlines3 ( void  )
int UtcDaliImageOperationsAverageScanlinesRGB565 ( void  )

Test the function for averaging vertically-adjacent pairs of RGB565 pixels on a scanline.

Definition at line 1070 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::AverageScanlinesRGB565(), DALI_TEST_EQUALS(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsAverageScanlinesRGBA8888 ( void  )
int UtcDaliImageOperationsBilinearFilter1BPP ( void  )

Test the four-tap linear blending for single-byte modes.

Definition at line 1479 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BilinearFilter1Component(), DALI_TEST_EQUALS(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsDownscaleBitmap ( void  )

Test the top-level function for reducing the dimension of a bitmap, feeding it each of the five pixel formats that are output by image loaders.

Simply assert that the resulting bitmaps have the expected dimensions and formats.

Definition at line 377 of file utc-Dali-ImageOperations.cpp.

References END_TEST, Dali::Pixel::L8, Dali::Pixel::LA88, Dali::Pixel::RGB565, Dali::Pixel::RGB888, Dali::Pixel::RGBA8888, TEST_LOCATION, and TestDownscaledBitmapHasRightDimensionsAndFormat().

Here is the call graph for this function:

int UtcDaliImageOperationsDownscaleInPlacePow2ComponentPair ( void  )

Do additional downscaling testing using 2-byte-per-pixel images in raw image arrays to shake out differences relating to the pixel format.

Note
: No need to be as comprehensive as with RGB888 and RGBA8888 as the logic is shared.

Definition at line 757 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, Dali::Internal::Platform::DownscaleInPlacePow2ComponentPair(), END_TEST, TEST_LOCATION, and TestDownscaleOutputsExpectedDimensions2ComponentPair().

Here is the call graph for this function:

int UtcDaliImageOperationsDownscaleInPlacePow2RGB565 ( void  )

Do additional downscaling testing using RGB565 images in raw image arrays to shake out differences relating to the pixel format.

Definition at line 716 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, Dali::Internal::Platform::DownscaleInPlacePow2RGB565(), END_TEST, TEST_LOCATION, and TestDownscaleOutputsExpectedDimensionsRGB565().

Here is the call graph for this function:

int UtcDaliImageOperationsDownscaleInPlacePow2RGB888 ( void  )

Test downscaling of RGB888 images as raw pixel arrays.

Definition at line 406 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, DALI_TEST_CHECK, DALI_TEST_EQUALS(), Dali::Internal::Platform::DownscaleInPlacePow2RGB888(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888 ( void  )

Test downscaling of RGBA8888 images in raw image arrays.

Definition at line 575 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, DALI_TEST_EQUALS(), Dali::Internal::Platform::DownscaleInPlacePow2RGBA8888(), END_TEST, TEST_LOCATION, and TestDownscaleOutputsExpectedDimensionsRGBA8888().

Here is the call graph for this function:

int UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888Nops ( void  )
int UtcDaliImageOperationsDownscaleInPlacePow2SingleBytePerPixel ( void  )

Do additional downscaling testing using 1-byte-per-pixel images in raw image arrays to shake out differences relating to the pixel format.

Definition at line 790 of file utc-Dali-ImageOperations.cpp.

References Dali::Internal::Platform::BoxDimensionTestBoth, Dali::Internal::Platform::DownscaleInPlacePow2SingleBytePerPixel(), END_TEST, TEST_LOCATION, and TestDownscaleOutputsExpectedDimensionsSingleComponent().

Here is the call graph for this function:

int UtcDaliImageOperationsHalveScanlineInPlace1Byte ( void  )

Test the function for averaging pairs of pixels on a scanline.

Definition at line 921 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, Dali::Internal::Platform::HalveScanlineInPlace1Byte(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTests1Byte(), Dali::VectorBase::Size(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsHalveScanlineInPlace2Bytes ( void  )

Test the function for averaging pairs of pixels on a scanline.

Definition at line 896 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, Dali::Internal::Platform::HalveScanlineInPlace2Bytes(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTests2Bytes(), Dali::VectorBase::Size(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsHalveScanlineInPlaceRGB565 ( void  )
int UtcDaliImageOperationsHalveScanlineInPlaceRGB888 ( void  )

Test the function for averaging pairs of pixels on a scanline.

Definition at line 816 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, Dali::Internal::Platform::HalveScanlineInPlaceRGB888(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsHalveScanlineInPlaceRGBA8888 ( void  )
int UtcDaliImageOperationsPointSampleCheckerboardRGBA888 ( void  )

Test the right pixels are generated when downsampling a checkerboard into a small image.

Definition at line 1226 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeCheckerboardImageRGBA8888(), Dali::Internal::Platform::PointSample4BPP(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsPointSampleRGB88InBounds ( void  )

Test that a scaling doesn't stray outside the bounds of the destination image.

The test allocates a destination buffer that is an exact multiple of the page size with guard pages at either end.

The only real test is whether the above code SEGVs, but do a fake test so we pass if that hasn't happened:

Definition at line 1421 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::FreeReadOnlyPagesRGBA(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeGuardedOutputImageRGBA8888(), Dali::Internal::Platform::PointSample3BPP(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsPointSampleRGBA888InBounds ( void  )

Test that a scaling doesn't stray outside the bounds of the destination image.

The test allocates a destination buffer that is an exact multiple of the page size with guard pages at either end.

The only real test is whether the above code SEGVs, but do a fake test so we pass if that hasn't happened:

Definition at line 1198 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::FreeReadOnlyPagesRGBA(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeGuardedOutputImageRGBA8888(), Dali::Internal::Platform::PointSample4BPP(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsPointSampleRGBA888PixelsCorrectColor ( void  )
int UtcDaliImageOperationsPointSampleRGBA888ScaleToSinglePixel ( void  )

Test that scaling down to a 1x1 image works.

Definition at line 1324 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeSingleColorImageRGBA8888(), Dali::Internal::Platform::PointSample4BPP(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsPointSampleRGBA888ScaleToZeroDims ( void  )

Test that downsampling to 0 - area images is a NOP and does not modify the destination.

(edge-case)

The only real test is whether the above code SEGVs, but do a fake test so we pass if that hasn't happened:

Definition at line 1378 of file utc-Dali-ImageOperations.cpp.

References anonymous_namespace{utc-Dali-ImageOperations.cpp}::AllocateReadOnlyPagesRGBA(), DALI_TEST_EQUALS(), END_TEST, anonymous_namespace{utc-Dali-ImageOperations.cpp}::FreeReadOnlyPagesRGBA(), anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeSingleColorImageRGBA8888(), Dali::Internal::Platform::PointSample4BPP(), and TEST_LOCATION.

Here is the call graph for this function:

int UtcDaliImageOperationsUint16Pair ( void  )

Test the small int (x,y) tuple.

Definition at line 1450 of file utc-Dali-ImageOperations.cpp.

References DALI_TEST_EQUALS(), END_TEST, and TEST_LOCATION.

Here is the call graph for this function:

Dali Docs Home
Read more about Dali