X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali%2Fdali-test-suite-utils%2Ftest-graphics-command-buffer.cpp;h=78c6fbbe2307743f44371a2957a57ba5b4f8bf77;hb=9e3a7dd52035de26e91dccf8d2356aac168c492b;hp=ed63416a3ea2ae100fb590dcfe0c3b9f5b47fde1;hpb=acc5890841e76f9a4b8c313664d25ed430233605;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-graphics-command-buffer.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-graphics-command-buffer.cpp index ed63416..78c6fbb 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-graphics-command-buffer.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-graphics-command-buffer.cpp @@ -73,4 +73,27 @@ std::vector TestGraphicsCommandBuffer::GetCommandsByType(CommandTypeMa return mCommandStack; } +std::vector TestGraphicsCommandBuffer::GetChildCommandsByType(CommandTypeMask mask) +{ + std::vector mCommandStack{}; + for(auto& cmd : mCommands) + { + if(uint32_t(cmd.type) == (mask & uint32_t(cmd.type))) + { + mCommandStack.emplace_back(&cmd); + } + if(cmd.type == CommandType::EXECUTE_COMMAND_BUFFERS) + { + for(auto secondaryCB : cmd.data.executeCommandBuffers.buffers) + { + for(auto command : secondaryCB->GetChildCommandsByType(mask)) + { + mCommandStack.push_back(command); + } + } + } + } + return mCommandStack; +} + } // namespace Dali