Updates to remove old temporary graphics APIs 57/305357/2
authorDavid Steele <david.steele@samsung.com>
Wed, 31 Jan 2024 19:01:49 +0000 (19:01 +0000)
committerDavid Steele <david.steele@samsung.com>
Thu, 1 Feb 2024 12:33:53 +0000 (12:33 +0000)
Change-Id: I36a057e8eb4d5615a92394fb19c094c87b22c190

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/graphics/gles-impl/egl-graphics-controller.cpp
dali/internal/graphics/gles-impl/egl-graphics-controller.h

index 47487e2..496fc3b 100644 (file)
@@ -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<TestGlAbstraction&>(mGraphicsController.GetGlAbstraction());
 }
 
-TestGlContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction()
-{
-  return static_cast<TestGlContextHelperAbstraction&>(mGraphicsController.GetGlContextHelperAbstraction());
-}
-
 TestGraphicsSyncImplementation& TestApplication::GetGraphicsSyncImpl()
 {
   return static_cast<TestGraphicsSyncImplementation&>(mGraphicsController.GetGraphicsSyncImpl());
index f4de9af..3726dae 100644 (file)
@@ -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<TestGlAbstraction&>(mGraphicsController.GetGlAbstraction());
 }
 
-TestGlContextHelperAbstraction& TestGraphicsApplication::GetGlContextHelperAbstraction()
-{
-  return static_cast<TestGlContextHelperAbstraction&>(mGraphicsController.GetGlContextHelperAbstraction());
-}
-
 void TestGraphicsApplication::ProcessEvent(const Integration::Event& event)
 {
   mCore->QueueEvent(event);
index aef657a..a16c64d 100644 (file)
@@ -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();
index e14499b..c7d457d 100644 (file)
@@ -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()
index 2530a70..e87d65b 100644 (file)
@@ -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);
index d8b911b..74adf5b 100644 (file)
@@ -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()
index 2c3f435..e9ac01f 100644 (file)
@@ -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();
 
   /**