there was a missing point which occured corrupted data in multi-processing.
Change-Id: Ifb28ee82852e488d23d45b4b75f0a6c70bb428b2
SwRenderer::~SwRenderer()
{
SwRenderer::~SwRenderer()
{
- if (progress.valid()) progress.get();
}
bool SwRenderer::clear()
{
}
bool SwRenderer::clear()
{
- if (progress.valid()) return false;
- return true;
bool SwRenderer::target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h)
{
if (!buffer || stride == 0 || w == 0 || h == 0) return false;
bool SwRenderer::target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h)
{
if (!buffer || stride == 0 || w == 0 || h == 0) return false;
bool SwRenderer::flush()
{
bool SwRenderer::flush()
{
- if (progress.valid()) {
- progress.get();
- return true;
+ while (prepareTasks.size() > 0) {
+ auto task = prepareTasks.front();
+ if (task->progress.valid()) task->progress.get();
+ prepareTasks.pop();
+
+ if (progress.valid()) progress.get();
+
+ return true;