X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fubuntu-x11%2Fnative-image-source-impl-x.h;h=c9059124ab1f9bc207336b9a6259721f93f2e8e7;hb=1d0d7873858fd2010b71e5db8f03654fb307370f;hp=9b74b2ace2d06ecb309378c49ac7639833b4942d;hpb=803e8299a9916479bc4cc60f2e4763d5bea6739a;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 9b74b2a..c905912 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) 2020 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,7 +19,7 @@ */ // EXTERNAL INCLUDES -#include +#include // INTERNAL INCLUDES #include @@ -54,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); /** @@ -66,12 +66,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetPixels() */ - bool GetPixels(std::vector &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const override; - - /** - * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) - */ - bool EncodeToFile(const std::string& filename) const override; + bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override; /** * @copydoc Dali::NativeImageSource::SetSource( Any source ) @@ -89,19 +84,19 @@ public: ~NativeImageSourceX() override; /** - * @copydoc Dali::NativeImageSource::GlExtensionCreate() + * @copydoc Dali::NativeImageSource::CreateResource() */ - bool GlExtensionCreate() override; + bool CreateResource() override; /** - * @copydoc Dali::NativeImageSource::GlExtensionDestroy() + * @copydoc Dali::NativeImageSource::DestroyResource() */ - void GlExtensionDestroy() override; + void DestroyResource() override; /** * @copydoc Dali::NativeImageSource::TargetTexture() */ - unsigned int TargetTexture() override; + uint32_t TargetTexture() override; /** * @copydoc Dali::NativeImageSource::PrepareTexture() @@ -111,7 +106,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetWidth() */ - unsigned int GetWidth() const override + uint32_t GetWidth() const override { return mWidth; } @@ -119,7 +114,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetHeight() */ - unsigned int GetHeight() const override + uint32_t GetHeight() const override { return mHeight; } @@ -133,6 +128,32 @@ public: } /** + * @copydoc Dali::NativeImageSource::GetTextureTarget() + */ + int GetTextureTarget() const override; + + /** + * @copydoc Dali::NativeImageSource::GetCustomFragmentPrefix() + */ + const char* GetCustomFragmentPrefix() const override; + + /** + * @copydoc Dali::NativeImageSource::GetCustomSamplerTypename() + */ + const char* GetCustomSamplerTypename() const override; + + /** + * @copydoc Dali::NativeImageSource::GetNativeImageHandle() + */ + Any GetNativeImageHandle() const override; + + /** + * @copydoc Dali::NativeImageSource::SourceChanged() + */ + bool SourceChanged() const override; + + + /** * @copydoc Dali::NativeImageInterface::GetExtension() */ NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override @@ -140,6 +161,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: /** @@ -149,8 +180,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); @@ -181,8 +212,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 @@ -197,4 +228,4 @@ private: } // namespace Dali -#endif // __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__ +#endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H