sw_engine renderer: fix to success SwCanvas Unit Test.
authorHermet Park <chuneon.park@samsung.com>
Mon, 7 Jun 2021 09:09:35 +0000 (18:09 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 8 Jun 2021 00:44:03 +0000 (09:44 +0900)
render init count shouldn't be counted when it's in a fail-case.

src/lib/sw_engine/tvgSwRenderer.cpp

index 1006fd1..9d3b28d 100644 (file)
@@ -616,7 +616,10 @@ bool SwRenderer::init(uint32_t threads)
 
     //Share the memory pool among the renderer
     globalMpool = mpoolInit(threads);
-    if (!globalMpool) return false;
+    if (!globalMpool) {
+        --initEngineCnt;
+        return false;
+    }
 
     return true;
 }