#define __DALI_INTERNAL_COMPRESSED_BITMAP_H__
/*
- * 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.
* A container for image data that remains in compresssed form as an opaque blob
* in memory rather than being decompressed at load time.
* Used for formats that are supported as GLES texture data directly.
- * \sa{Bitmap BitmapPackedPixel BitmapExternal}
*/
-class DALI_IMPORT_API BitmapCompressed : public Dali::Integration::Bitmap, Dali::Integration::Bitmap::CompressedProfile
+class BitmapCompressed : public Dali::Integration::Bitmap, Dali::Integration::Bitmap::CompressedProfile
{
public:
/**
* Constructor
* @param[in] discardable Flag to tell the bitmap if it can delete the buffer with the pixel data.
*/
- BitmapCompressed( bool discardable = false );
+ BitmapCompressed( ResourcePolicy::Discardable discardable = ResourcePolicy::OWNED_RETAIN );
virtual const Bitmap::CompressedProfile* GetCompressedProfile() const { return this; }
virtual Bitmap::CompressedProfile* GetCompressedProfile() { return this; }
* @param[in] bufferSize Buffer cpacity in pixels
*/
void Initialize(Pixel::Format pixelFormat,
- unsigned int width,
- unsigned int height,
- const std::size_t bufferSize);
+ uint32_t width,
+ uint32_t height,
+ uint32_t bufferSize);
public:
/**
* (Re-)Allocate pixel buffer for the Bitmap. Any previously allocated pixel buffer
* @return pixel buffer pointer
*/
virtual Dali::Integration::PixelBuffer* ReserveBufferOfSize( Pixel::Format pixelFormat,
- const unsigned width,
- const unsigned height,
- const std::size_t numBytes );
+ const uint32_t width,
+ const uint32_t height,
+ const uint32_t numBytes );
/**
* Get the pixel buffer size in bytes
* @return The buffer size in bytes.
*/
- virtual std::size_t GetBufferSize() const
+ virtual uint32_t GetBufferSize() const
{
return mBufferSize;
}
+ /**
+ * See Dali::Integration::Bitmap::GetReleaseFunction()
+ */
+ ReleaseFunction GetReleaseFunction(){ return FREE; }
+
protected:
/**
private:
- std::size_t mBufferSize;
+ uint32_t mBufferSize;
BitmapCompressed(const BitmapCompressed& other); ///< defined private to prevent use
BitmapCompressed& operator = (const BitmapCompressed& other); ///< defined private to prevent use