From: ANZ1217 Date: Fri, 3 Nov 2023 02:04:04 +0000 (+0900) Subject: Add FrontBufferRendering property in WindowData X-Git-Tag: dali_2.2.52~8^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=841a2f4f9d83cd369b1ed23a932758e7b804161e;hp=4ff1fdf5714f8535c95df0bb007b929645677be4;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Add FrontBufferRendering property in WindowData Change-Id: Iae60d9fdb7af5663f2275fdac938feda2a05c44a --- diff --git a/automated-tests/src/dali-adaptor/utc-Dali-WindowData.cpp b/automated-tests/src/dali-adaptor/utc-Dali-WindowData.cpp index abe4286..4b99b3f 100644 --- a/automated-tests/src/dali-adaptor/utc-Dali-WindowData.cpp +++ b/automated-tests/src/dali-adaptor/utc-Dali-WindowData.cpp @@ -71,3 +71,14 @@ int UtcDaliWindowData04(void) END_TEST; } + +int UtcDaliWindowData05(void) +{ + // Test SetFrontBufferRendering and GetFrontBufferRendering + WindowData windowData; + windowData.SetFrontBufferRendering(true); + + DALI_TEST_CHECK(windowData.GetFrontBufferRendering() == true); + + END_TEST; +} \ No newline at end of file diff --git a/dali/public-api/adaptor-framework/window-data.cpp b/dali/public-api/adaptor-framework/window-data.cpp index 6d329bb..cf197d3 100644 --- a/dali/public-api/adaptor-framework/window-data.cpp +++ b/dali/public-api/adaptor-framework/window-data.cpp @@ -25,13 +25,15 @@ struct WindowData::Impl Impl() : mPositionSize(0, 0, 0, 0), mIsTransparent(true), - mWindowType(WindowType::NORMAL) + mWindowType(WindowType::NORMAL), + mIsFrontBufferRendering(false) { } - Dali::Rect mPositionSize; ///< The position and size of the Window - bool mIsTransparent; ///< The transparency of the Window - WindowType mWindowType; ///< The window type of the Window + Dali::Rect mPositionSize; ///< The position and size of the Window + bool mIsTransparent; ///< The transparency of the Window + WindowType mWindowType; ///< The window type of the Window + bool mIsFrontBufferRendering; ///< The front buffer rendering of the Window }; WindowData::WindowData() @@ -71,4 +73,14 @@ WindowType WindowData::GetWindowType() const return mImpl->mWindowType; } +void WindowData::SetFrontBufferRendering(bool enable) +{ + mImpl->mIsFrontBufferRendering = enable; +} + +bool WindowData::GetFrontBufferRendering() const +{ + return mImpl->mIsFrontBufferRendering; +} + } // namespace Dali diff --git a/dali/public-api/adaptor-framework/window-data.h b/dali/public-api/adaptor-framework/window-data.h index b7bf089..24d2779 100644 --- a/dali/public-api/adaptor-framework/window-data.h +++ b/dali/public-api/adaptor-framework/window-data.h @@ -34,6 +34,7 @@ namespace Dali * PositionSize : x:0, y:0, w:0, h:0 (full-screen window) * Transparency : true (Window is created with 32-bit color depth) * WindowType : NORMAL + * mIsFrontBufferRendering : false * * If you want to customize the window, you can modify the values of the WindowData object as needed. * @SINCE_2_2.23 @@ -99,6 +100,22 @@ public: */ WindowType GetWindowType() const; + /** + * @brief Sets the front buffer rendering + * + * @SINCE_2_2.51 + * @param[in] enable whether to use front buffer rendering + */ + void SetFrontBufferRendering(bool enable); + + /** + * @brief Gets the front buffer rendering + * + * @SINCE_2_2.51 + * @return whether front buffer rendering is enabled + */ + bool GetFrontBufferRendering() const; + private: struct Impl; std::unique_ptr mImpl;