Dali 3D User Interface Engine
List of all members | Static Public Member Functions | Private Member Functions
Dali::Internal::EncodedBufferImage Class Reference

EncodedBufferImage represents an image resource that can be added to actors etc. More...

#include <encoded-buffer-image-impl.h>

Inheritance diagram for Dali::Internal::EncodedBufferImage:
Inheritance graph
Collaboration diagram for Dali::Internal::EncodedBufferImage:
Collaboration graph

Static Public Member Functions

static EncodedBufferImagePtr New (const uint8_t *const encodedImage, const std::size_t encodedImageByteCount, ImageDimensions size=ImageDimensions(0, 0), FittingMode::Type scalingMode=FittingMode::SHRINK_TO_FIT, SamplingMode::Type samplingMode=SamplingMode::BOX, bool orientationCorrection=true, const ReleasePolicy releasePol=Dali::Image::NEVER)
 Create an initialised image object from an encoded image buffer in memory. More...
- Static Public Member Functions inherited from Dali::Internal::Image
static bool DoConnectSignal (BaseObject *object, ConnectionTrackerInterface *tracker, const std::string &signalName, FunctorDelegate *functor)
 Connects a callback function with the object's signals. More...

Private Member Functions

 EncodedBufferImage (ReleasePolicy releasePol=IMAGE_RELEASE_POLICY_DEFAULT)
 Construct using the supplied load policy. More...

Additional Inherited Members

- Public Member Functions inherited from Dali::Internal::Image
ReleasePolicy GetReleasePolicy () const
 .3 More...
Dali::Image::ImageSignalTypeUploadedSignal ()
 This signal is emitted when the image data gets uploaded to GL. More...
ResourceId GetResourceId () const
 returns the Id used for lookups More...
virtual unsigned int GetWidth () const
 Get the width of the image. More...
virtual unsigned int GetHeight () const
 Get the height of the image. More...
virtual Vector2 GetNaturalSize () const
 Return the natural size of the image. More...
virtual void ResourceLoadingFailed (const ResourceTicket &ticket)
 Called when a resource fails to load. More...
virtual void ResourceLoadingSucceeded (const ResourceTicket &ticket)
 Called when a resource loads successfully. More...
virtual void ResourceUploaded (const ResourceTicket &ticket)
 Called when a resource is uploaded to graphics memory. More...
virtual void Connect ()
 Indicates that the image is used. More...
virtual void Disconnect ()
 Indicates that the image is not used anymore. More...
- Protected Member Functions inherited from Dali::Internal::Image
virtual ~Image ()
 A reference counted object may only be deleted by calling Unreference() More...
 Image (ReleasePolicy releasePol=IMAGE_RELEASE_POLICY_DEFAULT)
 Constructor, with default parameters. More...
void Initialize ()
 Second stage initialization. More...
- Protected Attributes inherited from Dali::Internal::Image
ResourceTicketPtr mTicket
 smart pointer to the ticket object that gets completed when load finishes More...
unsigned int mWidth
 natural width of the image, needs to be mutable for lazy resolving and as the API for GetWidth is const More...
unsigned int mHeight
 natural height of the image, needs to be mutable for lazy resolving and as the API for GetHeight is const More...
unsigned int mConnectionCount
 number of on-stage objects using this image More...
ReleasePolicy mReleasePolicy: 2
 2 bits is enough space More...

Detailed Description

EncodedBufferImage represents an image resource that can be added to actors etc.

A memory buffer of encoded image data is provided by the application and decoded asynchronously on a background thread to fill the image's pixel data.

Definition at line 49 of file encoded-buffer-image-impl.h.

Constructor & Destructor Documentation

Dali::Internal::EncodedBufferImage::EncodedBufferImage ( ReleasePolicy  releasePol = IMAGE_RELEASE_POLICY_DEFAULT)

Construct using the supplied load policy.

Definition at line 55 of file encoded-buffer-image-impl.h.

Referenced by New().

Here is the caller graph for this function:

Member Function Documentation

EncodedBufferImagePtr Dali::Internal::EncodedBufferImage::New ( const uint8_t *const  encodedImage,
const std::size_t  encodedImageByteCount,
ImageDimensions  size = ImageDimensions(0, 0),
FittingMode::Type  scalingMode = FittingMode::SHRINK_TO_FIT,
SamplingMode::Type  samplingMode = SamplingMode::BOX,
bool  orientationCorrection = true,
const ReleasePolicy  releasePol = Dali::Image::NEVER 

Create an initialised image object from an encoded image buffer in memory.

[in]encodedImageThe encoded bytes of an image, in a supported image format such as PNG, JPEG, GIF, BMP, KTX, ICO, and WBMP, organised exactly as it would be as a file in the filesystem. The caller retains ownership of this buffer and is free to modify or discard it as soon as the function returns.
[in]encodedImageByteCountThe size in bytes of the buffer pointed to by encodedImage.
[in]attributesRequested parameters for loading (size, scaling etc.).
[in]releasePolThe ReleasePolicy to apply to image. Since it cannot be recreated by dali, the default of Never will usually make sense.
A pointer to a newly allocated object, or null on error.

Definition at line 40 of file encoded-buffer-image-impl.cpp.

References Dali::Internal::ResourceClient::AddBitmapImage(), DALI_ASSERT_ALWAYS, DALI_ASSERT_DEBUG, Dali::Integration::PlatformAbstraction::DecodeBuffer(), EncodedBufferImage(), Dali::Internal::ThreadLocalStorage::Get(), Dali::IntrusivePtr< T >::Get(), Dali::Integration::PlatformAbstraction::GetClosestImageSize(), Dali::Uint16Pair::GetHeight(), Dali::Internal::ThreadLocalStorage::GetPlatformAbstraction(), Dali::Internal::ThreadLocalStorage::GetResourceClient(), and Dali::Uint16Pair::GetWidth().

Referenced by Dali::EncodedBufferImage::New().

Here is the call graph for this function:

Here is the caller graph for this function:

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