X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fcommon%2Fnative-bitmap-buffer-impl.h;h=344334f331bda633dbb35e04cda1f4a7f7c2b18e;hb=refs%2Ftags%2Fsubmit%2Ftizen%2F20210901.082233;hp=f1ff5fc5eb1ca7ef12e90e210a0800072e4dd73b;hpb=5db4baf9315efcf9977007530a975dab60ffb0c5;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/common/native-bitmap-buffer-impl.h b/dali/internal/imaging/common/native-bitmap-buffer-impl.h index f1ff5fc..344334f 100644 --- a/dali/internal/imaging/common/native-bitmap-buffer-impl.h +++ b/dali/internal/imaging/common/native-bitmap-buffer-impl.h @@ -2,7 +2,7 @@ #define DALI_NATIVE_BITMAP_BUFFER_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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,11 +19,11 @@ */ // EXTERNAL HEADERS -#include -#include #include #include #include +#include +#include // INTERNAL HEADERS #include @@ -31,13 +31,10 @@ namespace Dali { - namespace Internal { - namespace Adaptor { - class NativeBitmapBuffer; typedef IntrusivePtr NativeBitmapBufferPtr; @@ -46,7 +43,6 @@ typedef IntrusivePtr NativeBitmapBufferPtr; */ class NativeBitmapBuffer : public NativeImageInterface { - public: /** * Constructor. @@ -55,7 +51,7 @@ public: * @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, unsigned int width, unsigned int height, Pixel::Format pixelFormat); /** * virtual destructor @@ -68,56 +64,81 @@ public: * @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 unsigned char* src, size_t size); public: /** - * @copydoc Dali::NativeImageInterface::GlExtensionCreate() + * @copydoc Dali::NativeImageInterface::CreateResource() */ - virtual bool GlExtensionCreate(); + bool CreateResource() override; /** - * @copydoc Dali::NativeImageInterface::GlExtensionDestroy() + * @copydoc Dali::NativeImageInterface::DestroyResource() */ - virtual void GlExtensionDestroy(); + void DestroyResource() override; /** * @copydoc Dali::NativeImageInterface::TargetTexture() */ - virtual unsigned int TargetTexture(); + unsigned int TargetTexture() override; /** * @copydoc Dali::NativeImageInterface::PrepareTexture() */ - virtual void PrepareTexture(); + void PrepareTexture() override; /** * @copydoc Dali::NativeImageInterface::GetWidth() */ - virtual unsigned int GetWidth() const; + unsigned int GetWidth() const override; /** * @copydoc Dali::NativeImageInterface::GetHeight() */ - virtual unsigned int GetHeight() const; + unsigned int GetHeight() const override; + + /** + * @copydoc Dali::NativeImageInterface::RequiresBlending() + */ + bool RequiresBlending() const override; /** * @copydoc Dali::NativeImageInterface::RequiresBlending() */ - virtual bool RequiresBlending() const; + int GetTextureTarget() const override; + + /** + * @copydoc Dali::NativeImageInterface::ApplyNativeFragmentShader() + */ + bool ApplyNativeFragmentShader(std::string& shader) override; + + /** + * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename() + */ + const char* GetCustomSamplerTypename() const override; + + /** + * @copydoc Dali::NativeImageInterface::GetNativeImageHandle() + */ + Any GetNativeImageHandle() const override; + + /** + * @copydoc Dali::NativeImageInterface::SourceChanged() + */ + bool SourceChanged() const override; private: - NativeBitmapBuffer( const NativeBitmapBuffer& ); ///< not defined - NativeBitmapBuffer& operator =( const NativeBitmapBuffer& ); ///< not defined - NativeBitmapBuffer(); ///< not defined + NativeBitmapBuffer(const NativeBitmapBuffer&); ///< not defined + NativeBitmapBuffer& operator=(const NativeBitmapBuffer&); ///< not defined + NativeBitmapBuffer(); ///< not defined private: - Integration::GlAbstraction* mGlAbstraction; ///< GlAbstraction used + Integration::GlAbstraction* mGlAbstraction; ///< GlAbstraction used - Integration::LocklessBuffer* mBuffer; ///< bitmap data double buffered - unsigned int mWidth; ///< Image width - unsigned int mHeight; ///< Image height - Pixel::Format mPixelFormat; ///< Image pixelformat + Integration::LocklessBuffer* mBuffer; ///< bitmap data double buffered + unsigned int mWidth; ///< Image width + unsigned int mHeight; ///< Image height + Pixel::Format mPixelFormat; ///< Image pixelformat const unsigned char* mLastReadBuffer; ///< last buffer that was read };