X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-application.h;h=5e86b3c13b2ce7fd550958d5520d41c53e1cb454;hb=066e03a9fba3484f28cb8b83b4722769cee09466;hp=e7d8c7673a7391f254caf624ca738f466d030d03;hpb=06390b11a4bbb71ee3d9a0508ed33cb3aa14d8a3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h index e7d8c76..5e86b3c 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h @@ -2,7 +2,7 @@ #define DALI_TEST_APPLICATION_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -38,6 +38,8 @@ public: static const uint32_t DEFAULT_SURFACE_WIDTH = 480; static const uint32_t DEFAULT_SURFACE_HEIGHT = 800; + static const Rect DEFAULT_SURFACE_RECT; + static constexpr uint32_t DEFAULT_HORIZONTAL_DPI = 220; static constexpr uint32_t DEFAULT_VERTICAL_DPI = 217; @@ -58,21 +60,22 @@ public: void InitializeCore(); ~TestApplication() override; static void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message); - static void LogContext(bool start, const char* tag); + static void LogContext(bool start, const char* tag, const char* message); Dali::Integration::Core& GetCore(); TestPlatformAbstraction& GetPlatform(); TestRenderController& GetRenderController(); TestGraphicsController& GetGraphicsController(); TestGlAbstraction& GetGlAbstraction(); - TestGlSyncAbstraction& GetGlSyncAbstraction(); TestGlContextHelperAbstraction& GetGlContextHelperAbstraction(); + TestGraphicsSyncImplementation& GetGraphicsSyncImpl(); void ProcessEvent(const Integration::Event& event); void SendNotification(); - bool Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL); + bool Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL, bool uploadOnly = false); bool PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector>& damagedRects); bool RenderWithPartialUpdate(std::vector>& damagedRects, Rect& clippingRect); + bool RenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location = NULL); uint32_t GetUpdateStatus(); bool UpdateOnly(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL); bool RenderOnly(); @@ -90,8 +93,11 @@ public: return mScene; } + void AddScene(Integration::Scene scene); + void RemoveScene(Integration::Scene scene); + private: - void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL); + void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL, bool uploadOnly = false); protected: TestPlatformAbstraction mPlatformAbstraction; @@ -101,13 +107,16 @@ protected: Integration::UpdateStatus mStatus; Integration::RenderStatus mRenderStatus; - Integration::Core* mCore; - Dali::Integration::Scene mScene; + Integration::Core* mCore; + Dali::Integration::Scene mScene; + std::vector mScenes; uint32_t mSurfaceWidth; uint32_t mSurfaceHeight; uint32_t mFrame; + Graphics::UniquePtr mRenderTarget; + struct { uint32_t x;