sw_engine: fix crash at merge shape test
authorHermet Park <chuneon.park@samsung.com>
Thu, 30 Apr 2020 06:41:16 +0000 (15:41 +0900)
committerHermet Park <chuneon.park@samsung.com>
Thu, 30 Apr 2020 06:43:13 +0000 (15:43 +0900)
increased spare cell memory for rasterizing.

Change-Id: I391dfbfae0ef028d213c55fe1ceca023e272e676

src/lib/sw_engine/tvgSwRle.cpp
test/testMergeShapes.cpp

index 3991fff..02870c3 100644 (file)
@@ -671,7 +671,8 @@ static bool _genRle(RleWorker& rw)
 
 SwRleData* rleRender(const SwShape& sdata, const SwSize& clip)
 {
-    constexpr auto RENDER_POOL_SIZE = 16384L;
+    //Please adjust when you out of cell memory (default: 16384L)
+    constexpr auto RENDER_POOL_SIZE = 166641L;
     constexpr auto BAND_SIZE = 40;
 
     auto outline = sdata.outline;
index 549ea9e..b37440b 100644 (file)
@@ -20,10 +20,9 @@ void tvgtest()
     auto shape1 = tvg::ShapeNode::gen();
     shape1->appendRect(0, 0, 200, 200, 0);          //x, y, w, h, cornerRadius
     shape1->appendRect(100, 100, 300, 300, 100);    //x, y, w, h, cornerRadius
-    shape1->appendCircle(500, 500, 100, 100);       //cx, cy, radiusW, radiusH
-    //FIXME: eeek! crash!
- //   shape1->appendCircle(400, 600, 170, 100);       //cx, cy, radiusW, radiusH
-    shape1->fill(255, 0, 0, 255);                   //r, g, b, a
+    shape1->appendCircle(400, 400, 100, 100);       //cx, cy, radiusW, radiusH
+    shape1->appendCircle(400, 500, 170, 100);       //cx, cy, radiusW, radiusH
+    shape1->fill(255, 255, 0, 255);                 //r, g, b, a
 
     /* Push the shape into the Canvas drawing list
        When this shape is into the canvas list, the shape could update & prepare