X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-application.h;h=e224c6b4448ee69b98650fd64b67d08cea8f0bb3;hp=d1e042d3e6083df07e994394ad9ea4a2bdd196bc;hb=3fea156f024c5b2909e6a6aa9daaffd3767d7108;hpb=141d88c741ff0aef9aa74259f116fc17023e043a 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 d1e042d..e224c6b 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 @@ -1,8 +1,8 @@ -#ifndef __DALI_TEST_APPLICATION_H__ -#define __DALI_TEST_APPLICATION_H__ +#ifndef DALI_TEST_APPLICATION_H +#define DALI_TEST_APPLICATION_H /* - * Copyright (c) 2018 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. @@ -20,13 +20,14 @@ // INTERNAL INCLUDES #include -#include "test-gesture-manager.h" #include "test-gl-sync-abstraction.h" #include "test-gl-abstraction.h" +#include "test-gl-context-helper-abstraction.h" #include "test-render-controller.h" #include #include #include +#include namespace Dali { @@ -39,13 +40,8 @@ public: static const uint32_t DEFAULT_SURFACE_WIDTH = 480; static const uint32_t DEFAULT_SURFACE_HEIGHT = 800; -#ifdef _CPP11 static constexpr uint32_t DEFAULT_HORIZONTAL_DPI = 220; static constexpr uint32_t DEFAULT_VERTICAL_DPI = 217; -#else - static const uint32_t DEFAULT_HORIZONTAL_DPI = 220; - static const uint32_t DEFAULT_VERTICAL_DPI = 217; -#endif static const uint32_t DEFAULT_RENDER_INTERVAL = 1; @@ -55,10 +51,14 @@ public: uint32_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, uint32_t horizontalDpi = DEFAULT_HORIZONTAL_DPI, uint32_t verticalDpi = DEFAULT_VERTICAL_DPI, - ResourcePolicy::DataRetention policy = ResourcePolicy::DALI_DISCARDS_ALL_DATA); + bool initialize = true, + bool enablePartialUpdate = false ); void Initialize(); - virtual ~TestApplication(); + void CreateCore(); + void CreateScene(); + void InitializeCore(); + ~TestApplication() override; static void LogMessage( Dali::Integration::Log::DebugPriority level, std::string& message ); static void LogContext( bool start, const char* tag ); Dali::Integration::Core& GetCore(); @@ -66,23 +66,29 @@ public: TestRenderController& GetRenderController(); TestGlAbstraction& GetGlAbstraction(); TestGlSyncAbstraction& GetGlSyncAbstraction(); - TestGestureManager& GetGestureManager(); + TestGlContextHelperAbstraction& GetGlContextHelperAbstraction(); void ProcessEvent(const Integration::Event& event); void SendNotification(); - void SetSurfaceWidth( uint32_t width, unsigned height ); - void SetTopMargin( uint32_t margin ); bool Render( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL ); + bool PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector>& damagedRects); + bool RenderWithPartialUpdate(std::vector>& damagedRects, Rect& clippingRect); uint32_t GetUpdateStatus(); bool UpdateOnly( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL ); bool RenderOnly( ); void ResetContext(); bool GetRenderNeedsUpdate(); + bool GetRenderNeedsPostRender(); uint32_t Wait( uint32_t durationToWait ); static void EnableLogging( bool enabled ) { mLoggingEnabled = enabled; } + Integration::Scene GetScene() const + { + return mScene; + } + private: void DoUpdate( uint32_t intervalMilliseconds, const char* location=NULL ); @@ -91,12 +97,13 @@ protected: TestRenderController mRenderController; TestGlAbstraction mGlAbstraction; TestGlSyncAbstraction mGlSyncAbstraction; - TestGestureManager mGestureManager; + TestGlContextHelperAbstraction mGlContextHelperAbstraction; Integration::UpdateStatus mStatus; Integration::RenderStatus mRenderStatus; Integration::Core* mCore; + Dali::Integration::Scene mScene; uint32_t mSurfaceWidth; uint32_t mSurfaceHeight; @@ -104,10 +111,10 @@ protected: struct { uint32_t x; uint32_t y; } mDpi; uint32_t mLastVSyncTime; - ResourcePolicy::DataRetention mDataRetentionPolicy; + bool mPartialUpdateEnabled; static bool mLoggingEnabled; }; } // Dali -#endif +#endif // DALI_TEST_APPLICATION_H