-#ifndef __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__
-#define __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__
+#ifndef DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
+#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
*/
// EXTERNAL INCLUDES
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
// INTERNAL INCLUDES
#include <dali/internal/graphics/common/graphics-interface.h>
* @param[in] nativeImageSource contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
* @return A smart-pointer to a newly allocated image.
*/
- static NativeImageSourceX* New(unsigned int width,
- unsigned int height,
+ static NativeImageSourceX* 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<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
/**
* @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
/**
* @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;
}
return nullptr;
}
+ /**
+ * @copydoc Dali::Internal::Adaptor::NativeImageSource::AcquireBuffer()
+ */
+ uint8_t* AcquireBuffer( uint16_t& width, uint16_t& height, uint16_t& stride ) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::NativeImageSource::ReleaseBuffer()
+ */
+ bool ReleaseBuffer() override;
+
private:
/**
* @param[in] colour depth of the image.
* @param[in] nativeImageSource contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
*/
- NativeImageSourceX(unsigned int width,
- unsigned int height,
+ NativeImageSourceX( uint32_t width,
+ uint32_t height,
Dali::NativeImageSource::ColorDepth depth,
Any nativeImageSource);
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
Ecore_X_Pixmap mPixmap; ///< From Xlib
bool mBlendingRequired; ///< Whether blending is required
} // namespace Dali
-#endif // __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__
+#endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H