return Any(mPixmap);
}
-bool NativeImageSourceAndroid::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceAndroid::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
{
- DALI_ASSERT_DEBUG(sizeof(unsigned) == 4);
+ DALI_ASSERT_DEBUG(sizeof(uint32_t) == 4);
bool success = false;
width = mWidth;
uint32_t size = dstStride * bufferDescription.height;
pixbuf.resize(size);
//copy each row over
- const unsigned char* ptrSrc = reinterpret_cast<const unsigned char*>(buffer);
- unsigned char* ptrDst = pixbuf.data();
+ const uint8_t* ptrSrc = reinterpret_cast<const uint8_t*>(buffer);
+ uint8_t* ptrDst = pixbuf.data();
for(int y = 0; y < bufferDescription.height; y++, ptrSrc += srcStride, ptrDst += dstStride)
{
memcpy(ptrDst, ptrSrc, dstStride);
/**
* @copydoc Dali::NativeImageSource::GetPixels()
*/
- bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
+ bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
{
namespace Adaptor
{
-NativeBitmapBuffer::NativeBitmapBuffer(Adaptor* adaptor, unsigned int width, unsigned int height, Pixel::Format pFormat)
+NativeBitmapBuffer::NativeBitmapBuffer(Adaptor* adaptor, uint32_t width, uint32_t height, Pixel::Format pFormat)
: mGlAbstraction(nullptr),
mWidth(width),
mHeight(height),
Integration::ConvertToGlFormat(mPixelFormat, pixelDataType, pixelFormat);
- const unsigned char* buf = mBuffer->Read();
+ const uint8_t* buf = mBuffer->Read();
if(buf && buf != mLastReadBuffer) // Prevent same buffer being uploaded multiple times
{
}
}
-void NativeBitmapBuffer::Write(const unsigned char* src, size_t size)
+void NativeBitmapBuffer::Write(const uint8_t* src, size_t size)
{
mBuffer->Write(src, size); // Write will cause LocklessBuffer to switch to the other buffer
}
{
}
-unsigned int NativeBitmapBuffer::TargetTexture()
+uint32_t NativeBitmapBuffer::TargetTexture()
{
return 0;
}
-unsigned int NativeBitmapBuffer::GetWidth() const
+uint32_t NativeBitmapBuffer::GetWidth() const
{
return mWidth;
}
-unsigned int NativeBitmapBuffer::GetHeight() const
+uint32_t NativeBitmapBuffer::GetHeight() const
{
return mHeight;
}
* @param height height of image
* @param pixelFormat pixel format for image
*/
- NativeBitmapBuffer(Adaptor* adaptor, unsigned int width, unsigned int height, Pixel::Format pixelFormat);
+ NativeBitmapBuffer(Adaptor* adaptor, uint32_t width, uint32_t height, Pixel::Format pixelFormat);
/**
* virtual destructor
* @param[in] size size of data in bytes
* @return true if successful, false if currently reading from buffer in render thread
*/
- void Write(const unsigned char* src, size_t size);
+ void Write(const uint8_t* src, size_t size);
public:
/**
/**
* @copydoc Dali::NativeImageInterface::TargetTexture()
*/
- unsigned int TargetTexture() override;
+ uint32_t TargetTexture() override;
/**
* @copydoc Dali::NativeImageInterface::PrepareTexture()
/**
* @copydoc Dali::NativeImageInterface::GetWidth()
*/
- unsigned int GetWidth() const override;
+ uint32_t GetWidth() const override;
/**
* @copydoc Dali::NativeImageInterface::GetHeight()
*/
- unsigned int GetHeight() const override;
+ uint32_t GetHeight() const override;
/**
* @copydoc Dali::NativeImageInterface::RequiresBlending()
Integration::GlAbstraction* mGlAbstraction; ///< GlAbstraction used
Integration::LocklessBuffer* mBuffer; ///< bitmap data double buffered
- unsigned int mWidth; ///< Image width
- unsigned int mHeight; ///< Image height
+ uint32_t mWidth; ///< Image width
+ uint32_t mHeight; ///< Image height
Pixel::Format mPixelFormat; ///< Image pixelformat
- const unsigned char* mLastReadBuffer; ///< last buffer that was read
+ const uint8_t* mLastReadBuffer; ///< last buffer that was read
};
} // namespace Adaptor
/**
* @copydoc Dali::NativeImageSource::GetPixels()
*/
- virtual bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const = 0;
+ virtual bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const = 0;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
{
std::unique_ptr<NativeImageSource>
NativeImageSourceFactoryCocoa::CreateNativeImageSource(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource)
{
std::unique_ptr<NativeImageSourceQueue>
NativeImageSourceFactoryCocoa::CreateNativeImageSourceQueue(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSourceQueue::ColorFormat colorFormat,
Any nativeImageSourceQueue)
{
{
public:
std::unique_ptr<NativeImageSource> CreateNativeImageSource(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource) override;
std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSourceQueue::ColorFormat colorFormat,
Any nativeImageSourceQueue) override;
};
using Dali::Integration::PixelBuffer;
NativeImageSourceCocoa* NativeImageSourceCocoa::New(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource)
{
}
NativeImageSourceCocoa::NativeImageSourceCocoa(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource)
: mImage(MakeRef<CGImageRef>(nullptr)),
bool NativeImageSourceCocoa::GetPixels(
std::vector<uint8_t>& pixbuf,
- unsigned& width,
- unsigned& height,
+ uint32_t& width,
+ uint32_t& height,
Pixel::Format& pixelFormat) const
{
- width = CGImageGetWidth(mImage.get());
- height = CGImageGetHeight(mImage.get());
+ width = static_cast<uint32_t>(CGImageGetWidth(mImage.get()));
+ height = static_cast<uint32_t>(CGImageGetHeight(mImage.get()));
return true;
}
{
}
-unsigned int NativeImageSourceCocoa::TargetTexture()
+uint32_t NativeImageSourceCocoa::TargetTexture()
{
return 0;
}
return Any(mImage.get());
}
-unsigned int NativeImageSourceCocoa::GetWidth() const
+uint32_t NativeImageSourceCocoa::GetWidth() const
{
- return CGImageGetWidth(mImage.get());
+ return static_cast<uint32_t>(CGImageGetWidth(mImage.get()));
}
-unsigned int NativeImageSourceCocoa::GetHeight() const
+uint32_t NativeImageSourceCocoa::GetHeight() const
{
- return CGImageGetHeight(mImage.get());
+ return static_cast<uint32_t>(CGImageGetHeight(mImage.get()));
}
bool NativeImageSourceCocoa::RequiresBlending() const
* @return A smart-pointer to a newly allocated image.
*/
static NativeImageSourceCocoa* New(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource);
* @copydoc Dali::NativeImageSource::GetPixels()
*/
bool GetPixels(
- std::vector<unsigned char>& pixbuf,
- unsigned int& width,
- unsigned int& height,
- Pixel::Format& pixelFormat) const override;
+ std::vector<uint8_t>& pixbuf,
+ uint32_t& width,
+ uint32_t& height,
+ Pixel::Format& pixelFormat) const override;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
/**
* @copydoc Dali::NativeImageSource::TargetTexture()
*/
- unsigned int TargetTexture() override;
+ uint32_t TargetTexture() override;
/**
* @copydoc Dali::NativeImageSource::PrepareTexture()
/**
* @copydoc Dali::NativeImageSource::GetWidth()
*/
- unsigned int GetWidth() const override;
+ uint32_t GetWidth() const override;
/**
* @copydoc Dali::NativeImageSource::GetHeight()
*/
- unsigned int GetHeight() const override;
+ uint32_t GetHeight() const override;
/**
* @copydoc Dali::NativeImageSource::RequiresBlending()
* @param[in] nativeImageSource contains either: pixmap of type Win32 Pixmap , a WinPixmap or is empty
*/
NativeImageSourceCocoa(
- unsigned int width,
- unsigned int height,
+ uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource);
return Any(mTbmSurface);
}
-bool NativeImageSourceTizen::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceTizen::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
{
std::scoped_lock lock(mMutex);
if(mTbmSurface != NULL)
return false;
}
- tbm_format format = surface_info.format;
- uint32_t stride = surface_info.planes[0].stride;
- unsigned char* ptr = surface_info.planes[0].ptr;
+ tbm_format format = surface_info.format;
+ uint32_t stride = surface_info.planes[0].stride;
+ uint8_t* ptr = surface_info.planes[0].ptr;
width = mWidth;
height = mHeight;
lineSize = width * 3;
pixelFormat = Pixel::RGB888;
pixbuf.resize(lineSize * height);
- unsigned char* bufptr = &pixbuf[0];
+ uint8_t* bufptr = &pixbuf[0];
- for(unsigned int r = 0; r < height; ++r, bufptr += lineSize)
+ for(uint32_t r = 0; r < height; ++r, bufptr += lineSize)
{
- for(unsigned int c = 0; c < width; ++c)
+ for(uint32_t c = 0; c < width; ++c)
{
cOffset = c * 3;
offset = cOffset + r * stride;
lineSize = width * 4;
pixelFormat = Pixel::RGBA8888;
pixbuf.resize(lineSize * height);
- unsigned char* bufptr = &pixbuf[0];
+ uint8_t* bufptr = &pixbuf[0];
- for(unsigned int r = 0; r < height; ++r, bufptr += lineSize)
+ for(uint32_t r = 0; r < height; ++r, bufptr += lineSize)
{
- for(unsigned int c = 0; c < width; ++c)
+ for(uint32_t c = 0; c < width; ++c)
{
cOffset = c * 4;
offset = cOffset + r * stride;
lineSize = width * 4;
pixelFormat = Pixel::RGBA8888;
pixbuf.resize(lineSize * height);
- unsigned char* bufptr = &pixbuf[0];
+ uint8_t* bufptr = &pixbuf[0];
- for(unsigned int r = 0; r < height; ++r, bufptr += lineSize)
+ for(uint32_t r = 0; r < height; ++r, bufptr += lineSize)
{
- for(unsigned int c = 0; c < width; ++c)
+ for(uint32_t c = 0; c < width; ++c)
{
cOffset = c * 4;
offset = cOffset + r * stride;
if(tbm_surface_query_formats(&formats, &formatNum))
{
- for(unsigned int i = 0; i < formatNum; i++)
+ for(uint32_t i = 0; i < formatNum; i++)
{
if(formats[i] == format)
{
return updatedArea;
}
- unsigned char* srcBuffer = info.planes[0].ptr;
- unsigned char* dstBuffer = backBufferInfo.planes[0].ptr;
+ uint8_t* srcBuffer = info.planes[0].ptr;
+ uint8_t* dstBuffer = backBufferInfo.planes[0].ptr;
uint32_t stride = info.planes[0].stride;
uint32_t bytesPerPixel = info.bpp >> 3;
/**
* @copydoc Dali::NativeImageSource::GetPixels()
*/
- bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
+ bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
return NULL;
}
- unsigned char* buffer = info.planes[0].ptr;
+ uint8_t* buffer = info.planes[0].ptr;
if(!buffer)
{
DALI_LOG_ERROR("tbm buffer pointer is null! [%p]\n", tbmSurface);
bool CheckBlending(int format);
private:
- typedef std::pair<tbm_surface_h, void*> EglImagePair;
- typedef std::pair<tbm_surface_h, void*> BufferPair;
+ typedef std::pair<tbm_surface_h, void*> EglImagePair;
+ typedef std::pair<tbm_surface_h, uint8_t*> BufferPair;
Dali::Mutex mMutex; ///< Mutex
uint32_t mWidth; ///< image width
return Any(mPixmap);
}
-bool NativeImageSourceX::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceX::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
{
- DALI_ASSERT_DEBUG(sizeof(unsigned) == 4);
+ DALI_ASSERT_DEBUG(sizeof(uint32_t) == 4);
bool success = false;
width = mWidth;
height = mHeight;
{
pixelFormat = Pixel::RGB888;
pixbuf.resize(width * height * 3);
- unsigned char* bufPtr = &pixbuf[0];
+ uint8_t* bufPtr = &pixbuf[0];
- for(unsigned y = 0; y < height; ++y)
+ for(uint32_t y = 0; y < height; ++y)
{
- for(unsigned x = 0; x < width; ++x, bufPtr += 3)
+ for(uint32_t x = 0; x < width; ++x, bufPtr += 3)
{
- const unsigned pixel = XGetPixel(pXImage, x, y);
+ const uint32_t pixel = XGetPixel(pXImage, x, y);
// store as RGB
- const unsigned blue = pixel & 0xFFU;
- const unsigned green = (pixel >> 8) & 0xFFU;
- const unsigned red = (pixel >> 16) & 0xFFU;
+ const uint32_t blue = pixel & 0xFFU;
+ const uint32_t green = (pixel >> 8) & 0xFFU;
+ const uint32_t red = (pixel >> 16) & 0xFFU;
*bufPtr = red;
*(bufPtr + 1) = green;
// Sweep through the image, doing a vertical flip, but handling each scanline as
// an inlined intrinsic/builtin memcpy (should be fast):
pixbuf.resize(width * height * 4);
- unsigned* bufPtr = reinterpret_cast<unsigned*>(&pixbuf[0]);
- const unsigned xDataLineSkip = pXImage->bytes_per_line;
+ uint32_t* bufPtr = reinterpret_cast<uint32_t*>(&pixbuf[0]);
+ const uint32_t xDataLineSkip = pXImage->bytes_per_line;
const size_t copy_count = static_cast<size_t>(width) * 4;
pixelFormat = Pixel::BGRA8888;
- for(unsigned y = 0; y < height; ++y, bufPtr += width)
+ for(uint32_t y = 0; y < height; ++y, bufPtr += width)
{
const char* const in = pXImage->data + xDataLineSkip * y;
/**
* @copydoc Dali::NativeImageSource::GetPixels()
*/
- bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
+ bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
{
namespace Adaptor
{
-std::unique_ptr<NativeImageSource> NativeImageSourceFactoryWin::CreateNativeImageSource(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+std::unique_ptr<NativeImageSource> NativeImageSourceFactoryWin::CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
{
return std::unique_ptr<NativeImageSource>(NativeImageSourceWin::New(width, height, depth, nativeImageSource));
}
-std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
+std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
{
return std::unique_ptr<NativeImageSourceQueue>(nullptr);
}
class NativeImageSourceFactoryWin : public NativeImageSourceFactory
{
public:
- std::unique_ptr<NativeImageSource> CreateNativeImageSource(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
+ std::unique_ptr<NativeImageSource> CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
- std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
+ std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
};
} // namespace Adaptor
{
using Dali::Integration::PixelBuffer;
-NativeImageSourceWin* NativeImageSourceWin::New(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+NativeImageSourceWin* NativeImageSourceWin::New(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
{
NativeImageSourceWin* image = new NativeImageSourceWin(width, height, depth, nativeImageSource);
DALI_ASSERT_DEBUG(image && "NativeImageSource allocation failed.");
return image;
}
-NativeImageSourceWin::NativeImageSourceWin(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+NativeImageSourceWin::NativeImageSourceWin(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
: mWidth(width),
mHeight(height),
mOwnPixmap(true),
return Any(mPixmap);
}
-bool NativeImageSourceWin::GetPixels(std::vector<uint8_t>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceWin::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
{
- DALI_ASSERT_DEBUG(sizeof(unsigned) == 4);
+ DALI_ASSERT_DEBUG(sizeof(uint32_t) == 4);
bool success = false;
width = mWidth;
height = mHeight;
}
}
-unsigned int NativeImageSourceWin::TargetTexture()
+uint32_t NativeImageSourceWin::TargetTexture()
{
mEglImageExtensions->TargetTextureKHR(mEglImageKHR);
#include <dali/public-api/adaptor-framework/native-image-source.h>
#include <dali/internal/imaging/common/native-image-source-impl.h>
+#include <cstdint>
namespace Dali
{
* @param[in] nativeImageSource contains either: pixmap of type Win32 Pixmap , a WinPixmap or is empty
* @return A smart-pointer to a newly allocated image.
*/
- static NativeImageSourceWin* New(unsigned int width,
- unsigned int height,
+ static NativeImageSourceWin* New(uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource);
/**
/**
* @copydoc Dali::NativeImageSource::GetPixels()
*/
- bool GetPixels(std::vector<unsigned char>& pixbuf, unsigned int& width, unsigned int& height, Pixel::Format& pixelFormat) const override;
+ bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
/**
* @copydoc Dali::NativeImageSource::TargetTexture()
*/
- unsigned int TargetTexture() override;
+ uint32_t TargetTexture() override;
/**
* @copydoc Dali::NativeImageSource::PrepareTexture()
/**
* @copydoc Dali::NativeImageSource::GetWidth()
*/
- unsigned int GetWidth() const override
+ uint32_t GetWidth() const override
{
return mWidth;
}
/**
* @copydoc Dali::NativeImageSource::GetHeight()
*/
- unsigned int GetHeight() const override
+ uint32_t GetHeight() const override
{
return mHeight;
}
* @param[in] colour depth of the image.
* @param[in] nativeImageSource contains either: pixmap of type Win32 Pixmap , a WinPixmap or is empty
*/
- NativeImageSourceWin(unsigned int width,
- unsigned int height,
+ NativeImageSourceWin(uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource);
void GetPixmapDetails();
private:
- unsigned int mWidth; ///< image width
- unsigned int mHeight; ///< image heights
+ uint32_t mWidth; ///< image width
+ uint32_t mHeight; ///< image heights
bool mOwnPixmap; ///< Whether we created pixmap or not
unsigned int mPixmap; ///< From Windows
bool mBlendingRequired; ///< Whether blending is required
namespace Dali
{
-NativeImageSourcePtr NativeImageSource::New(unsigned int width, unsigned int height, ColorDepth depth)
+NativeImageSourcePtr NativeImageSource::New(uint32_t width, uint32_t height, ColorDepth depth)
{
Any empty;
NativeImageSourcePtr image = new NativeImageSource(width, height, depth, empty);
return image;
}
-bool NativeImageSource::GetPixels(std::vector<unsigned char>& pixbuf, unsigned int& width, unsigned int& height, Pixel::Format& pixelFormat) const
+bool NativeImageSource::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
{
return mImpl->GetPixels(pixbuf, width, height, pixelFormat);
}
mImpl->DestroyResource();
}
-unsigned int NativeImageSource::TargetTexture()
+uint32_t NativeImageSource::TargetTexture()
{
return mImpl->TargetTexture();
}
mImpl->PrepareTexture();
}
-unsigned int NativeImageSource::GetWidth() const
+uint32_t NativeImageSource::GetWidth() const
{
return mImpl->GetWidth();
}
-unsigned int NativeImageSource::GetHeight() const
+uint32_t NativeImageSource::GetHeight() const
{
return mImpl->GetHeight();
}
return mImpl->GetNativeImageInterfaceExtension();
}
-NativeImageSource::NativeImageSource(unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSource)
+NativeImageSource::NativeImageSource(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSource)
{
auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
mImpl = factory->CreateNativeImageSource(width, height, depth, nativeImageSource).release();
* @param[in] depth color depth of the image
* @return A smart-pointer to a newly allocated image
*/
- static NativeImageSourcePtr New(unsigned int width, unsigned int height, ColorDepth depth);
+ static NativeImageSourcePtr New(uint32_t width, uint32_t height, ColorDepth depth);
/**
* @brief Creates a new NativeImageSource from an existing native image source.
* @param[out] pixelFormat pixel format used by image
* @return @c true if the pixels were gotten, and @c false otherwise
*/
- bool GetPixels(std::vector<unsigned char>& pixbuf, unsigned int& width, unsigned int& height, Pixel::Format& pixelFormat) const;
+ bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const;
/**
* @brief Converts the current pixel contents to either a JPEG or PNG format
*/
bool IsColorDepthSupported(ColorDepth colorDepth);
+public: // native image
+ /**
+ * @copydoc Dali::NativeImageInterface::GetWidth()
+ */
+ uint32_t GetWidth() const override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::GetHeight()
+ */
+ uint32_t GetHeight() const override;
+
/**
* @copydoc Dali::NativeImageInterface::GetTextureTarget()
*/
/**
* @copydoc Dali::NativeImageInterface::TargetTexture()
*/
- unsigned int TargetTexture() override;
+ uint32_t TargetTexture() override;
/**
* @copydoc Dali::NativeImageInterface::PrepareTexture()
*/
void PrepareTexture() override;
- /**
- * @copydoc Dali::NativeImageInterface::GetWidth()
- */
- unsigned int GetWidth() const override;
-
- /**
- * @copydoc Dali::NativeImageInterface::GetHeight()
- */
- unsigned int GetHeight() const override;
-
/**
* @copydoc Dali::NativeImageInterface::RequiresBlending()
*/
* @param[in] depth color depth of the image
* @param[in] nativeImageSource contains either: native image source or is empty
*/
- DALI_INTERNAL NativeImageSource(unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSource);
+ DALI_INTERNAL NativeImageSource(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSource);
/**
* @brief A reference counted object may only be deleted by calling Unreference().