X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Frendering%2Fframe-buffer-impl.h;h=9913b4d89f573c8e1196c70a7f7924b42f155c90;hb=79881246746f65474b24ea4fe14151ccef8df3f4;hp=af03c69941f22c31db59e6f3f9fdf81edcd067fa;hpb=aab92d59f88deeb60464aa9af9031bb38fea891c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/rendering/frame-buffer-impl.h b/dali/internal/event/rendering/frame-buffer-impl.h index af03c69..9913b4d 100644 --- a/dali/internal/event/rendering/frame-buffer-impl.h +++ b/dali/internal/event/rendering/frame-buffer-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_FRAME_BUFFER_H /* - * Copyright (c) 2016 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. @@ -22,12 +22,15 @@ #include // DALI_ASSERT_ALWAYS #include // Dali::IntrusivePtr #include -#include -#include +#include +#include #include +#include namespace Dali { +using Mask = Dali::FrameBuffer::Attachment::Mask; + namespace Internal { namespace Render @@ -42,17 +45,22 @@ class FrameBuffer : public BaseObject { public: - typedef Dali::FrameBuffer::Format Format; + using Mask = Dali::FrameBuffer::Attachment::Mask; /** * @brief Create a new FrameBuffer * - * @param[in] width The width of the FrameBuffer - * @param[in] height The height of the FrameBuffer - * @param[in] format The format of the FrameBuffer + * @param[in] width The width of the FrameBuffer + * @param[in] height The height of the FrameBuffer + * @param[in] attachments The attachments comprising the format of the FrameBuffer (bit-mask) * @return A smart-pointer to the newly allocated Texture. */ - static FrameBufferPtr New( unsigned int width, unsigned int height, Format format ); + static FrameBufferPtr New( uint32_t width, uint32_t height, Mask attachments ); + + /** + * A reference counted object may only be deleted by calling Unreference() + */ + virtual ~FrameBuffer(); /** * @brief Get the FrameBuffer render object @@ -64,22 +72,29 @@ public: /** * @copydoc Dali::FrameBuffer::AttachColorTexture() */ - void AttachColorTexture( NewTexturePtr texture, unsigned int mipmapLevel, unsigned int layer ); + void AttachColorTexture( TexturePtr texture, uint32_t mipmapLevel, uint32_t layer ); /** * @copydoc Dali::FrameBuffer::GetColorTexture() */ - NewTexture* GetColorTexture(); + Texture* GetColorTexture(uint8_t index) const; + + /** + * @brief Sets the frame buffer size. + * @param[in] width The width size + * @param[in] height The height size + */ + void SetSize( uint32_t width, uint32_t height ); private: // implementation /** * Constructor - * @param[in] width The width of the FrameBuffer - * @param[in] height The height of the FrameBuffer - * @param[in] format The format of the FrameBuffer + * @param[in] width The width of the FrameBuffer + * @param[in] height The height of the FrameBuffer + * @param[in] attachments The attachments comprising the format of the FrameBuffer (bit-mask) */ - FrameBuffer( unsigned int width, unsigned int height, Format format ); + FrameBuffer( uint32_t width, uint32_t height, Mask attachments ); /** * Second stage initialization of the Texture @@ -88,25 +103,22 @@ private: // implementation protected: - /** - * A reference counted object may only be deleted by calling Unreference() - */ - virtual ~FrameBuffer(); - private: // unimplemented methods - FrameBuffer( const FrameBuffer& ); - FrameBuffer& operator=( const FrameBuffer& ); -private: // data + FrameBuffer() = delete; + FrameBuffer( const FrameBuffer& ) = delete; + FrameBuffer& operator=( const FrameBuffer& ) = delete; - Internal::EventThreadServices& mEventThreadServices; ///