X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fubuntu-x11%2Fnative-image-source-impl-x.h;h=5306938788a4a336fb3f2540bd04fe8b048ba143;hb=a6f211ea194a64bda86d9e2237a9a91e8620b208;hp=75f93121b773caec7f6b7d31d5d1f690097bcbb4;hpb=761f75cd51351b7a4e072130f4a2ad0b3e3231bb;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h index 75f9312..5306938 100755 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h @@ -1,8 +1,8 @@ -#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. @@ -19,9 +19,11 @@ */ // EXTERNAL INCLUDES -#include +#include // INTERNAL INCLUDES +#include + #include #include @@ -52,8 +54,8 @@ public: * @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); /** @@ -64,7 +66,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetPixels() */ - bool GetPixels(std::vector &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const override; + bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override; /** * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) @@ -99,7 +101,7 @@ public: /** * @copydoc Dali::NativeImageSource::TargetTexture() */ - unsigned int TargetTexture() override; + uint32_t TargetTexture() override; /** * @copydoc Dali::NativeImageSource::PrepareTexture() @@ -109,7 +111,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetWidth() */ - unsigned int GetWidth() const override + uint32_t GetWidth() const override { return mWidth; } @@ -117,7 +119,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetHeight() */ - unsigned int GetHeight() const override + uint32_t GetHeight() const override { return mHeight; } @@ -138,6 +140,16 @@ public: 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: /** @@ -147,8 +159,8 @@ 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); @@ -179,8 +191,8 @@ private: 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 @@ -195,4 +207,4 @@ private: } // namespace Dali -#endif // __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__ +#endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H