X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Frenderers%2Frender-surface-frame-buffer.h;h=ebe7eb59ae340e2b70e3ca065d9dd946fd0b5381;hb=c163578c36b4a1674b06ab7f1f3cd446b7f840f6;hp=576ea65e59604dd1351b7e658c377ef963c7b19e;hpb=403f5989d41f4e5c5a657e24020fe32c77fc1414;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/renderers/render-surface-frame-buffer.h b/dali/internal/render/renderers/render-surface-frame-buffer.h index 576ea65..ebe7eb5 100644 --- a/dali/internal/render/renderers/render-surface-frame-buffer.h +++ b/dali/internal/render/renderers/render-surface-frame-buffer.h @@ -18,6 +18,7 @@ */ // INTERNAL INCLUDES +#include #include #include @@ -82,6 +83,19 @@ public: */ bool IsSurfaceBacked() override { return true; }; + /** + * @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 ); + + /** + * @brief Sets the background color. + * @param[in] color The new background color + */ + void SetBackgroundColor( const Vector4& color ); + public: /** @@ -117,8 +131,35 @@ private: Integration::RenderSurface* mSurface; ///< The render surface Context* mContext; ///< The context holding the GL state of rendering for the surface backed frame buffer + + uint32_t mWidth; + uint32_t mHeight; + Vector4 mBackgroundColor; + bool mSizeChanged; }; +// Messages for FrameBuffer +inline void SetFrameBufferSizeMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, uint32_t width, uint32_t height ) +{ + typedef MessageValue2< SurfaceFrameBuffer, uint32_t, uint32_t > LocalType; + + // Reserve some memory inside the message queue + uint32_t* slot = updateManager.ReserveMessageSlot( sizeof( LocalType ) ); + + // Construct message in the message queue memory; note that delete should not be called on the return value + new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetSize, width, height ); +} + +inline void SetFrameBufferBackgroundColorMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, const Vector4& color ) +{ + typedef MessageValue1< SurfaceFrameBuffer, Vector4 > LocalType; + + // Reserve some memory inside the message queue + uint32_t* slot = updateManager.ReserveMessageSlot( sizeof( LocalType ) ); + + // Construct message in the message queue memory; note that delete should not be called on the return value + new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetBackgroundColor, color ); +} } // namespace Render