X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-graphics-controller.cpp;h=ddcf0f5111ac45f7c604fb13d70aa517e5f453b8;hb=refs%2Fchanges%2F50%2F257250%2F1;hp=282f7a43684f290d07197a19fa0aef850449268b;hpb=de872571cf9b167665e003f30115c1c8cc600678;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.cpp index 282f7a4..ddcf0f5 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.cpp @@ -176,7 +176,6 @@ std::ostream& operator<<(std::ostream& o, const Graphics::FramebufferCreateInfo& return o; } - int GetNumComponents(Graphics::VertexInputFormat vertexFormat) { switch(vertexFormat) @@ -385,7 +384,6 @@ GLenum GetBlendOp(Graphics::BlendOp blendOp) return op; } - class TestGraphicsMemory : public Graphics::Memory { public: @@ -453,7 +451,6 @@ TestGraphicsController::TestGraphicsController() trace.EnableLogging(true); } - void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& submitInfo) { TraceCallStack::NamedParams namedParams; @@ -546,21 +543,6 @@ void TestGraphicsController::ProcessCommandBuffer(TestGraphicsCommandBuffer& com case CommandType::BIND_PIPELINE: { currentPipeline = Uncast(cmd.data.bindPipeline.pipeline); - - // Bind framebuffer if different. @todo Move to RenderPass - auto framebuffer = currentPipeline->framebufferState.framebuffer; - if(framebuffer && framebuffer != currentFramebuffer) - { - auto graphicsFramebuffer = Uncast(framebuffer); - graphicsFramebuffer->Bind(); - } - else - { - if(currentFramebuffer) - currentFramebuffer->Bind(); - else - mGl.BindFramebuffer(GL_FRAMEBUFFER, 0); - } BindPipeline(currentPipeline); break; } @@ -625,7 +607,7 @@ void TestGraphicsController::ProcessCommandBuffer(TestGraphicsCommandBuffer& com // Process secondary command buffers for(auto& buf : cmd.data.executeCommandBuffers.buffers) { - ProcessCommandBuffer(*static_cast(buf)); + ProcessCommandBuffer(*Uncast(buf)); } break; } @@ -693,10 +675,10 @@ void TestGraphicsController::ProcessCommandBuffer(TestGraphicsCommandBuffer& com { // Test scissor area and RT size const auto& area = cmd.data.beginRenderPass.renderArea; - if( area.x == 0 && - area.y == 0 && - area.width == renderTarget->mCreateInfo.extent.width && - area.height == renderTarget->mCreateInfo.extent.height ) + if(area.x == 0 && + area.y == 0 && + area.width == renderTarget->mCreateInfo.extent.width && + area.height == renderTarget->mCreateInfo.extent.height) { mGl.Disable(GL_SCISSOR_TEST); mGl.Clear(mask); @@ -704,8 +686,7 @@ void TestGraphicsController::ProcessCommandBuffer(TestGraphicsCommandBuffer& com else { mGl.Enable(GL_SCISSOR_TEST); - mGl.Scissor(cmd.data.beginRenderPass.renderArea.x, cmd.data.beginRenderPass.renderArea.y, - cmd.data.beginRenderPass.renderArea.width, cmd.data.beginRenderPass.renderArea.height); + mGl.Scissor(cmd.data.beginRenderPass.renderArea.x, cmd.data.beginRenderPass.renderArea.y, cmd.data.beginRenderPass.renderArea.width, cmd.data.beginRenderPass.renderArea.height); mGl.Clear(mask); mGl.Disable(GL_SCISSOR_TEST); } @@ -784,6 +765,9 @@ void TestGraphicsController::BindPipeline(TestGraphicsPipeline* pipeline) { mGl.Disable(GL_BLEND); } + + auto* program = static_cast(pipeline->programState.program); + mGl.UseProgram(program->mImpl->mId); } /**