From 481e6811f1b76d857d688e8ecda4954ec361bfd1 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 31 Jan 2024 19:01:49 +0000 Subject: [PATCH] Updates to remove old temporary graphics APIs Change-Id: I36a057e8eb4d5615a92394fb19c094c87b22c190 --- .../dali-test-suite-utils/test-application.cpp | 7 +------ .../dali-test-suite-utils/test-graphics-application.cpp | 7 +------ .../dali-test-suite-utils/test-graphics-application.h | 5 ++--- .../dali-test-suite-utils/test-graphics-controller.h | 8 ++++---- .../adaptor/common/combined-update-render-controller.cpp | 4 ++-- .../graphics/gles-impl/egl-graphics-controller.cpp | 6 +++--- dali/internal/graphics/gles-impl/egl-graphics-controller.h | 14 +++++++++++--- 7 files changed, 24 insertions(+), 27 deletions(-) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp index 47487e2..496fc3b 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-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-adaptor/dali-test-suite-utils/test-graphics-application.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.cpp index f4de9af..3726dae 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-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. @@ -165,11 +165,6 @@ TestGlAbstraction& TestGraphicsApplication::GetGlAbstraction() return static_cast(mGraphicsController.GetGlAbstraction()); } -TestGlContextHelperAbstraction& TestGraphicsApplication::GetGlContextHelperAbstraction() -{ - return static_cast(mGraphicsController.GetGlContextHelperAbstraction()); -} - void TestGraphicsApplication::ProcessEvent(const Integration::Event& event) { mCore->QueueEvent(event); diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.h index aef657a..a16c64d 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.h @@ -2,7 +2,7 @@ #define DALI_TEST_GRAPHICS_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. @@ -252,8 +252,7 @@ public: TestRenderController& GetRenderController(); Graphics::Controller& GetGraphicsController(); - TestGlAbstraction& GetGlAbstraction(); - TestGlContextHelperAbstraction& GetGlContextHelperAbstraction(); + TestGlAbstraction& GetGlAbstraction(); void ProcessEvent(const Integration::Event& event); void SendNotification(); diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h index e14499b..c7d457d 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-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. @@ -104,14 +104,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() diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 2530a70..e87d65b 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -610,8 +610,8 @@ void CombinedUpdateRenderController::UpdateRenderThread() auto numberOfPrecompiledShader = precompiledShader->shaderCount; for(int i = 0; i < numberOfPrecompiledShader; ++i) { - auto vertexShader = graphics.GetController().GetGlAbstraction().GetVertexShaderPrefix() + std::string(precompiledShader->vertexPrefix[i].data()) + std::string(precompiledShader->vertexShader.data()); - auto fragmentShader = graphics.GetController().GetGlAbstraction().GetFragmentShaderPrefix() + std::string(precompiledShader->fragmentPrefix[i].data()) + std::string(precompiledShader->fragmentShader.data()); + auto vertexShader = graphics.GetController().GetGraphicsConfig().GetVertexShaderPrefix() + std::string(precompiledShader->vertexPrefix[i].data()) + std::string(precompiledShader->vertexShader.data()); + auto fragmentShader = graphics.GetController().GetGraphicsConfig().GetFragmentShaderPrefix() + std::string(precompiledShader->fragmentPrefix[i].data()) + std::string(precompiledShader->fragmentShader.data()); PreCompileShader(std::move(vertexShader), std::move(fragmentShader)); } DALI_LOG_RELEASE_INFO("ShaderPreCompiler[ENABLE], shader count :%d \n", numberOfPrecompiledShader); diff --git a/dali/internal/graphics/gles-impl/egl-graphics-controller.cpp b/dali/internal/graphics/gles-impl/egl-graphics-controller.cpp index d8b911b..74adf5b 100644 --- a/dali/internal/graphics/gles-impl/egl-graphics-controller.cpp +++ b/dali/internal/graphics/gles-impl/egl-graphics-controller.cpp @@ -243,10 +243,10 @@ Integration::GlAbstraction& EglGraphicsController::GetGlAbstraction() return *mGlAbstraction; } -Integration::GlContextHelperAbstraction& EglGraphicsController::GetGlContextHelperAbstraction() +Integration::GraphicsConfig& EglGraphicsController::GetGraphicsConfig() { - DALI_ASSERT_DEBUG(mGlContextHelperAbstraction && "Graphics controller not initialized"); - return *mGlContextHelperAbstraction; + DALI_ASSERT_DEBUG(mGlAbstraction && "Graphics controller not initialized"); + return *mGlAbstraction; } Internal::Adaptor::EglSyncImplementation& EglGraphicsController::GetEglSyncImplementation() diff --git a/dali/internal/graphics/gles-impl/egl-graphics-controller.h b/dali/internal/graphics/gles-impl/egl-graphics-controller.h index 2c3f435..e9ac01f 100644 --- a/dali/internal/graphics/gles-impl/egl-graphics-controller.h +++ b/dali/internal/graphics/gles-impl/egl-graphics-controller.h @@ -2,7 +2,7 @@ #define DALI_EGL_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. @@ -91,8 +91,16 @@ public: Integration::GlContextHelperAbstraction& glContextHelperAbstraction, Internal::Adaptor::GraphicsInterface& graphicsInterface); - Integration::GlAbstraction& GetGlAbstraction() override; - Integration::GlContextHelperAbstraction& GetGlContextHelperAbstraction() override; + /** + * Used to access GL implementation + */ + Integration::GlAbstraction& GetGlAbstraction(); + + /** + * Used to access extra info about the graphics subsystem. + */ + Integration::GraphicsConfig& GetGraphicsConfig(); + Internal::Adaptor::EglSyncImplementation& GetEglSyncImplementation(); /** -- 2.7.4