tvg_loader: TVGLOG added in case an unknown fill or stroke tag used
authorMira Grudzinska <m.grudzinska@samsung.com>
Fri, 29 Oct 2021 00:09:56 +0000 (02:09 +0200)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 2 Nov 2021 00:41:05 +0000 (09:41 +0900)
src/loaders/tvg/tvgTvgBinInterpreter.cpp

index 62d01b2..17d106b 100644 (file)
@@ -225,6 +225,10 @@ static unique_ptr<Fill> _parseShapeFill(const char *ptr, const char *end)
                 fillGrad->colorStops(stops, stopsCnt);
                 break;
             }
+            default: {
+                TVGLOG("TVG", "Unsupported tag %d (0x%x) used as one of the fill properties, %d bytes skipped", block.type, block.type, block.length);
+                break;
+            }
         }
         ptr = block.end;
     }
@@ -286,6 +290,10 @@ static bool _parseShapeStroke(const char *ptr, const char *end, Shape *shape)
                 if (!_parseShapeStrokeDashPattern(block.data, block.end, shape)) return false;
                 break;
             }
+            default: {
+                TVGLOG("TVG", "Unsupported tag %d (0x%x) used as one of stroke properties, %d bytes skipped", block.type, block.type, block.length);
+                break;
+            }
         }
         ptr = block.end;
     }
@@ -382,7 +390,7 @@ static Paint* _parsePaint(TvgBinBlock baseBlock)
             break;
         }
         default: {
-            TVGERR("TVG", "Invalid Paint Type (%d)", baseBlock.type);
+            TVGERR("TVG", "Invalid Paint Type %d (0x%x)", baseBlock.type, baseBlock.type);
             return nullptr;
         }
     }
@@ -394,7 +402,7 @@ static Paint* _parsePaint(TvgBinBlock baseBlock)
         auto block = _readBlock(ptr);
         if (block.end > baseBlock.end) return paint;
         if (!parser(block, paint)) {
-            TVGERR("TVG", "Encountered the wrong paint properties... Paint Class (%d)", baseBlock.type);
+            TVGERR("TVG", "Encountered the wrong paint properties... Paint Class %d (0x%x)", baseBlock.type, baseBlock.type);
             return paint;
         }
         ptr = block.end;
@@ -424,4 +432,4 @@ unique_ptr<Scene> TvgBinInterpreter::run(const char *ptr, const char* end)
     }
 
     return scene;
-}
\ No newline at end of file
+}