Dali 3D User Interface Engine
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Dali::Internal::BitmapCompressed Class Reference

BitmapCompressed class. More...

#include <bitmap-compressed.h>

Inheritance diagram for Dali::Internal::BitmapCompressed:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::BitmapCompressed:
Collaboration graph
[legend]

Public Member Functions

 BitmapCompressed (ResourcePolicy::Discardable discardable=ResourcePolicy::OWNED_RETAIN)
 Constructor. More...
 
virtual const
Bitmap::CompressedProfile
GetCompressedProfile () const
 
virtual Bitmap::CompressedProfileGetCompressedProfile ()
 
virtual
Dali::Integration::PixelBuffer
ReserveBufferOfSize (Pixel::Format pixelFormat, const unsigned width, const unsigned height, const std::size_t numBytes)
 (Re-)Allocate pixel buffer for the Bitmap. More...
 
virtual std::size_t GetBufferSize () const
 Get the pixel buffer size in bytes. More...
 
- Public Member Functions inherited from Dali::Integration::Bitmap
void DiscardBuffer ()
 Inform the bitmap that its pixel buffer is no longer required and can be deleted to free up memory if the bitmap owns the buffer. More...
 
bool IsDiscardable () const
 Check if the pixel buffer can be discarded. More...
 
void DeletePixelBuffer ()
 Delete the pixel buffer data. More...
 
virtual ~Bitmap ()
 A reference counted object may only be deleted by calling Unreference() More...
 
unsigned int GetImageWidth () const
 Get the width of the image. More...
 
unsigned int GetImageHeight () const
 Get the height of the image. More...
 
Pixel::Format GetPixelFormat () const
 Get the pixel format. More...
 
virtual PixelBufferGetBuffer ()
 Get the pixel buffer if it's present. More...
 
PixelBufferGetBufferOwnership ()
 Get the pixel buffer if it's present and take over the ownership. More...
 
bool HasAlphaChannel () const
 Queries if the bitmap has an alpha channel. More...
 
bool IsFullyOpaque () const
 Queries if the bitmap has any transparent data. More...
 
virtual const PackedPixelsProfileGetPackedPixelsProfile () const
 Get interface to features that are active only if the Bitmap was created with a BITMAP_2D_PACKED_PIXELS profile. More...
 
virtual PackedPixelsProfileGetPackedPixelsProfile ()
 Get interface to features that are active only if the Bitmap was created with a BITMAP_2D_PACKED_PIXELS profile. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Protected Member Functions

virtual ~BitmapCompressed ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::Integration::Bitmap
 Bitmap (ResourcePolicy::Discardable discardable=ResourcePolicy::OWNED_RETAIN, Dali::Integration::PixelBuffer *pixBuf=0)
 Constructor Use the static function Bitmap::New() to create instances. More...
 
void Initialize (Pixel::Format pixelFormat, unsigned int width, unsigned int height)
 Initializes internal class members. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Private Member Functions

void Initialize (Pixel::Format pixelFormat, unsigned int width, unsigned int height, const std::size_t bufferSize)
 Initializes internal class members. More...
 
 BitmapCompressed (const BitmapCompressed &other)
 defined private to prevent use More...
 
BitmapCompressedoperator= (const BitmapCompressed &other)
 defined private to prevent use More...
 
- Private Member Functions inherited from Dali::Integration::Bitmap::CompressedProfile
virtual PixelBufferReserveBufferOfSize (Pixel::Format pixelFormat, const unsigned width, const unsigned height, const size_t numBytes)=0
 (Re-)Allocate pixel buffer for the Bitmap. More...
 

Private Attributes

std::size_t mBufferSize
 
 DALI_LOG_OBJECT_STRING_DECLARATION
 

Additional Inherited Members

- Public Types inherited from Dali::Integration::Bitmap
enum  Profile { BITMAP_2D_PACKED_PIXELS, BITMAP_COMPRESSED }
 Defines the characteristics of the Bitmap returned from the factory function. More...
 
- Static Public Member Functions inherited from Dali::Integration::Bitmap
static BitmapNew (Profile profile, ResourcePolicy::Discardable discardable)
 Create a new instance of a Bitmap with the required profile. More...
 
- Protected Attributes inherited from Dali::Integration::Bitmap
unsigned int mImageWidth
 Image width in pixels. More...
 
unsigned int mImageHeight
 Image height in pixels. More...
 
Pixel::Format mPixelFormat
 Pixel format. More...
 
bool mHasAlphaChannel
 Whether the image has an alpha channel. More...
 
bool mAlphaChannelUsed
 Whether the alpha channel is used in case the image owns one. More...
 
PixelBuffermData
 Raw pixel data. More...
 

Detailed Description

BitmapCompressed class.

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.

Definition at line 40 of file bitmap-compressed.h.

Constructor & Destructor Documentation

Dali::Internal::BitmapCompressed::BitmapCompressed ( ResourcePolicy::Discardable  discardable = ResourcePolicy::OWNED_RETAIN)

Constructor.

Parameters
[in]discardableFlag to tell the bitmap if it can delete the buffer with the pixel data.

Definition at line 35 of file bitmap-compressed.cpp.

Dali::Internal::BitmapCompressed::~BitmapCompressed ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 41 of file bitmap-compressed.cpp.

References DALI_LOG_TRACE_METHOD.

Dali::Internal::BitmapCompressed::BitmapCompressed ( const BitmapCompressed other)
private

defined private to prevent use

Member Function Documentation

virtual std::size_t Dali::Internal::BitmapCompressed::GetBufferSize ( ) const
inlinevirtual

Get the pixel buffer size in bytes.

Returns
The buffer size in bytes.

Implements Dali::Integration::Bitmap.

Definition at line 86 of file bitmap-compressed.h.

References mBufferSize.

virtual const Bitmap::CompressedProfile* Dali::Internal::BitmapCompressed::GetCompressedProfile ( ) const
inlinevirtual

Reimplemented from Dali::Integration::Bitmap.

Definition at line 49 of file bitmap-compressed.h.

virtual Bitmap::CompressedProfile* Dali::Internal::BitmapCompressed::GetCompressedProfile ( )
inlinevirtual

Reimplemented from Dali::Integration::Bitmap.

Definition at line 50 of file bitmap-compressed.h.

void Dali::Internal::BitmapCompressed::Initialize ( Pixel::Format  pixelFormat,
unsigned int  width,
unsigned int  height,
const std::size_t  bufferSize 
)
private

Initializes internal class members.

Parameters
[in]pixelFormatpixel format
[in]widthImage width in pixels
[in]heightImage height in pixels
[in]bufferSizeBuffer cpacity in pixels

Definition at line 46 of file bitmap-compressed.cpp.

References Dali::Integration::Bitmap::Initialize(), Dali::Integration::Bitmap::mAlphaChannelUsed, and mBufferSize.

Referenced by ReserveBufferOfSize().

Here is the call graph for this function:

Here is the caller graph for this function:

BitmapCompressed& Dali::Internal::BitmapCompressed::operator= ( const BitmapCompressed other)
private

defined private to prevent use

Dali::Integration::PixelBuffer * Dali::Internal::BitmapCompressed::ReserveBufferOfSize ( Pixel::Format  pixelFormat,
const unsigned  width,
const unsigned  height,
const std::size_t  numBytes 
)
virtual

(Re-)Allocate pixel buffer for the Bitmap.

Any previously allocated pixel buffer is deleted. Dali has ownership of the buffer, and contents are opaque and immutable. Bitmap stores given size information about the image which the client is assumed to have retrieved from out-of-band image metadata.

Parameters
[in]pixelFormatpixel format
[in]widthImage width in pixels
[in]heightImage height in pixels
[in]bufferSizeBuffer size in bytes
Returns
pixel buffer pointer

Definition at line 56 of file bitmap-compressed.cpp.

References DALI_ASSERT_DEBUG, Dali::Integration::Bitmap::DeletePixelBuffer(), Initialize(), and Dali::Integration::Bitmap::mData.

Here is the call graph for this function:

Member Data Documentation

Dali::Internal::BitmapCompressed::DALI_LOG_OBJECT_STRING_DECLARATION
private

Definition at line 106 of file bitmap-compressed.h.

std::size_t Dali::Internal::BitmapCompressed::mBufferSize
private

Definition at line 100 of file bitmap-compressed.h.

Referenced by GetBufferSize(), and Initialize().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali