[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-program.h
index d5f5b85..b81185a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_GRAPHICS_PROGRAM_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
 
 namespace Dali
 {
-class TestGraphicsProgram : public Graphics::Program
+class TestGraphicsController;
+
+class TestGraphicsProgramImpl
 {
 public:
-  TestGraphicsProgram(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats);
+  TestGraphicsProgramImpl(TestGraphicsController& controller, TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats, std::vector<UniformData>& customUniforms, std::vector<TestGraphicsReflection::TestUniformBlockInfo>& customUniformBlocks);
 
   // For API
   const TestGraphicsReflection& GetReflection() const
@@ -37,20 +39,44 @@ public:
   }
 
   // For tests
-  TestGraphicsReflection& GetProgamReflection()
+  TestGraphicsReflection& GetProgramReflection()
   {
     return mReflection;
   }
 
-  bool GetParameter(uint32_t parameterId, void* outData );
+  bool GetParameter(uint32_t parameterId, void* outData);
 
 public:
+  TestGraphicsController&     mController;
   TestGlAbstraction&          mGl;
   uint32_t                    mId;
   Graphics::ProgramCreateInfo mCreateInfo;
   TestGraphicsReflection      mReflection;
 };
 
+class TestGraphicsProgram : public Graphics::Program
+{
+public:
+  TestGraphicsProgram(TestGraphicsProgramImpl* impl);
+
+  const TestGraphicsReflection& GetReflection() const
+  {
+    return mImpl->GetReflection();
+  }
+  bool GetParameter(uint32_t parameterId, void* outData)
+  {
+    return mImpl->GetParameter(parameterId, outData);
+  }
+
+  TestGraphicsReflection& GetProgamReflection()
+  {
+    return mImpl->GetProgramReflection();
+  }
+
+public:
+  TestGraphicsProgramImpl* mImpl;
+};
+
 } // namespace Dali
 
 #endif //DALI_TEST_GRAPHICS_PROGRAM_H