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-graphics-controller.h;h=fa2fd63b30323361dfebdf77b638c51ed520261b;hp=f2181340382aa18eb7ab8fa6b004d0012512b5fa;hb=0e72d018e3fcf80e7ea319b0b888915b8d04e5c4;hpb=cef353d5b0add148dd99197bf25fb47a9c23d4d9 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 f218134..fa2fd63 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 @@ -21,6 +21,8 @@ #include "test-gl-abstraction.h" #include "test-gl-context-helper-abstraction.h" #include "test-gl-sync-abstraction.h" +#include "test-graphics-program.h" +#include "test-graphics-reflection.h" namespace Dali { @@ -43,12 +45,12 @@ public: void Initialize() { - mGlAbstraction.Initialize(); + mGl.Initialize(); } Integration::GlAbstraction& GetGlAbstraction() override { - return mGlAbstraction; + return mGl; } Integration::GlSyncAbstraction& GetGlSyncAbstraction() override @@ -175,6 +177,14 @@ public: Graphics::UniquePtr CreatePipeline(const Graphics::PipelineCreateInfo& pipelineCreateInfo, Graphics::UniquePtr&& oldPipeline) override; /** + * @brief Creates new Program object + * + * @param[in] programCreateInfo The valid ProgramCreateInfo structure + * @return pointer to the Program object + */ + Graphics::UniquePtr CreateProgram(const Graphics::ProgramCreateInfo& programCreateInfo, Graphics::UniquePtr&& oldProgram) override; + + /** * @brief Creates new Shader object * * @param[in] shaderCreateInfo The valid ShaderCreateInfo structure @@ -267,6 +277,14 @@ public: const Graphics::TextureProperties& GetTextureProperties(const Graphics::Texture& texture) override; /** + * @brief Returns the reflection of the given program + * + * @param[in] program The program + * @return The reflection of the program + */ + const Graphics::Reflection& GetProgramReflection(const Graphics::Program& program) override; + + /** * @brief Tests whether two Pipelines are the same. * * On the higher level, this function may help wit creating pipeline cache. @@ -275,16 +293,49 @@ public: */ bool PipelineEquals(const Graphics::Pipeline& pipeline0, const Graphics::Pipeline& pipeline1) const override; +public: // Test Functions + void SetVertexFormats(Property::Array& vfs) + { + mVertexFormats = vfs; + } + + void ClearSubmitStack() + { + mSubmitStack.clear(); + } + + /** + * @brief Retrieves program parameters + * + * This function can be used to retrieve data from internal implementation + * + * @param[in] program Valid program object + * @param[in] parameterId Integer parameter id + * @param[out] outData Pointer to output memory + * @return True on success + */ + bool GetProgramParameter(Graphics::Program& program, uint32_t parameterId, void* outData) override; + public: - mutable TraceCallStack mCallStack{"TestGraphics:"}; - mutable TraceCallStack mCommandBufferCallStack{"TestCommandBuffer:"}; + mutable TraceCallStack mCallStack; + mutable TraceCallStack mCommandBufferCallStack; + mutable std::vector mSubmitStack; - TestGlAbstraction mGlAbstraction; + TestGlAbstraction mGl; TestGlSyncAbstraction mGlSyncAbstraction; TestGlContextHelperAbstraction mGlContextHelperAbstraction; bool isDiscardQueueEmptyResult{true}; bool isDrawOnResumeRequiredResult{true}; + + Property::Array mVertexFormats; + + struct ProgramCache + { + std::map shaders; + TestGraphicsProgramImpl* programImpl; + }; + std::vector mProgramCache; }; } // namespace Dali