From d7f76f772324c9087c754cf3ff78ba93d4f7e177 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 1 Feb 2024 14:15:23 +0000 Subject: [PATCH] [Tizen] GraphicsBackend clean up backport This is a combination of 2 commits. Test harness sync Test harness sync Change-Id: Id9097935cbac664b75d9fe64049117bab42bf096 --- .../dali-toolkit/dali-toolkit-test-utils/test-application.cpp | 7 +------ .../dali-toolkit/dali-toolkit-test-utils/test-application.h | 3 +-- .../dali-toolkit-test-utils/test-graphics-controller.h | 10 ++++------ .../dali-toolkit-test-utils/test-graphics-sync-impl.cpp | 10 ++++++++++ .../dali-toolkit-test-utils/test-graphics-sync-impl.h | 7 +++++-- .../dali-toolkit-test-utils/test-graphics-sync-object.h | 5 ++--- 6 files changed, 23 insertions(+), 19 deletions(-) diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp index 47487e2..496fc3b 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -163,11 +163,6 @@ TestGlAbstraction& TestApplication::GetGlAbstraction() return static_cast(mGraphicsController.GetGlAbstraction()); } -TestGlContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction() -{ - return static_cast(mGraphicsController.GetGlContextHelperAbstraction()); -} - TestGraphicsSyncImplementation& TestApplication::GetGraphicsSyncImpl() { return static_cast(mGraphicsController.GetGraphicsSyncImpl()); 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 5e86b3c..555822d 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) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -67,7 +67,6 @@ public: TestGraphicsController& GetGraphicsController(); TestGlAbstraction& GetGlAbstraction(); - TestGlContextHelperAbstraction& GetGlContextHelperAbstraction(); TestGraphicsSyncImplementation& GetGraphicsSyncImpl(); void ProcessEvent(const Integration::Event& event); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h index e14499b..6066f67 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h @@ -2,7 +2,7 @@ #define TEST_GRAPHICS_CONTROLLER_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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,7 +20,6 @@ #include #include #include "test-gl-abstraction.h" -#include "test-gl-context-helper-abstraction.h" #include "test-graphics-command-buffer.h" #include "test-graphics-program.h" #include "test-graphics-reflection.h" @@ -104,14 +103,14 @@ public: mGl.Initialize(); } - Integration::GlAbstraction& GetGlAbstraction() override + Integration::GlAbstraction& GetGlAbstraction() { return mGl; } - Integration::GlContextHelperAbstraction& GetGlContextHelperAbstraction() override + Integration::GraphicsConfig& GetGraphicsConfig() { - return mGlContextHelperAbstraction; + return mGl; } TestGraphicsSyncImplementation& GetGraphicsSyncImpl() @@ -465,7 +464,6 @@ public: TestGlAbstraction mGl; TestGraphicsSyncImplementation mGraphicsSyncImpl; - TestGlContextHelperAbstraction mGlContextHelperAbstraction; bool isDiscardQueueEmptyResult{true}; bool isDrawOnResumeRequiredResult{true}; diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.cpp index 17f53a7..bb4a500 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.cpp @@ -38,6 +38,16 @@ bool TestSyncObject::IsSynced() return synced; } +void TestSyncObject::Wait() +{ + mTrace.PushCall("SyncObject::Wait", ""); // Trace the method +} + +void TestSyncObject::ClientWait() +{ + mTrace.PushCall("SyncObject::ClientWait", ""); // Trace the method +} + TestGraphicsSyncImplementation::TestGraphicsSyncImplementation() { Initialize(); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.h index cbc5331..21fd358 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-impl.h @@ -2,7 +2,7 @@ #define TEST_SYNC_IMPLEMENTATION_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -40,7 +40,10 @@ class TestSyncObject : public Integration::GraphicsSyncAbstraction::SyncObject public: TestSyncObject(TraceCallStack& trace); ~TestSyncObject() override; - bool IsSynced() override; + bool IsSynced() override; + void Wait() override; + void ClientWait() override; + bool synced; TraceCallStack& mTrace; }; diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-object.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-object.h index c33de6c..6886687 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-object.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-sync-object.h @@ -2,7 +2,7 @@ #define DALI_TEST_GRAPHICS_SYNC_OBJECT_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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,8 +19,7 @@ #include #include - -#include +#include "test-graphics-sync-impl.h" namespace Dali { -- 2.7.4