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-gl-sync-abstraction.h;h=73be9eefe1d74299c97e6c7f7b02e3cab8f761e7;hp=e2331765992c900327189745c9ab0e3feb903e3b;hb=5bc22f12881a16d7c5143c5e220fc0075aef6061;hpb=998d982768c7f211d948cfd7921ec27ff739ce49 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.h index e233176..73be9ee 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.h @@ -1,8 +1,8 @@ -#ifndef __TEST_GL_SYNC_ABSTRACTION_H__ -#define __TEST_GL_SYNC_ABSTRACTION_H__ +#ifndef TEST_GL_SYNC_ABSTRACTION_H +#define TEST_GL_SYNC_ABSTRACTION_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,32 +19,32 @@ */ // EXTERNAL INCLUDES +#include #include #include -#include // INTERNAL INCLUDES #include #include + #include "test-trace-call-stack.h" namespace Dali { - -class DALI_IMPORT_API TestSyncObject : public Integration::GlSyncAbstraction::SyncObject +class DALI_CORE_API TestSyncObject : public Integration::GlSyncAbstraction::SyncObject { public: TestSyncObject(TraceCallStack& trace); - ~TestSyncObject(); - bool IsSynced(); - bool synced; + ~TestSyncObject() override; + bool IsSynced() override; + bool synced; TraceCallStack& mTrace; }; /** * Class to emulate the GL sync functions with tracing */ -class DALI_IMPORT_API TestGlSyncAbstraction: public Integration::GlSyncAbstraction +class DALI_CORE_API TestGlSyncAbstraction : public Integration::GlSyncAbstraction { public: /** @@ -55,7 +55,7 @@ public: /** * Destructor */ - ~TestGlSyncAbstraction(); + ~TestGlSyncAbstraction() override; /** * Initialize the sync objects - clear down the map @@ -66,24 +66,23 @@ public: * Create a sync object * @return the sync object */ - virtual Integration::GlSyncAbstraction::SyncObject* CreateSyncObject( ); + Integration::GlSyncAbstraction::SyncObject* CreateSyncObject() override; /** * Destroy a sync object * @param[in] syncObject The object to destroy */ - virtual void DestroySyncObject( Integration::GlSyncAbstraction::SyncObject* syncObject ); - + void DestroySyncObject(Integration::GlSyncAbstraction::SyncObject* syncObject) override; public: // TEST FUNCTIONS - Integration::GlSyncAbstraction::SyncObject* GetLastSyncObject( ); + Integration::GlSyncAbstraction::SyncObject* GetLastSyncObject(); /** * Test method to trigger the object sync behaviour. * @param[in] * @param[in] sync The sync value to set */ - void SetObjectSynced( Integration::GlSyncAbstraction::SyncObject* syncObject, bool sync ); + void SetObjectSynced(Integration::GlSyncAbstraction::SyncObject* syncObject, bool sync); /** * Turn trace on @@ -100,13 +99,23 @@ public: // TEST FUNCTIONS */ TraceCallStack& GetTrace(); + /** + * Get the number of sync objects + * + * @return the number of sync objects + */ + int32_t GetNumberOfSyncObjects(); + private: - typedef std::vector SyncContainer; - typedef SyncContainer::iterator SyncIter; - SyncContainer mSyncObjects; ///< The sync objects - TraceCallStack mTrace; ///< the trace call stack for testing + TestGlSyncAbstraction(const TestGlSyncAbstraction&); ///< Undefined + TestGlSyncAbstraction& operator=(const TestGlSyncAbstraction&); ///< Undefined + + typedef std::vector SyncContainer; + typedef SyncContainer::iterator SyncIter; + SyncContainer mSyncObjects; ///< The sync objects + TraceCallStack mTrace{true, "gl"}; ///< the trace call stack for testing }; -} // Dali +} // namespace Dali -#endif // __TEST_GL_SYNC_ABSTRACTION_H__ +#endif // TEST_GL_SYNC_ABSTRACTION_H