examples: ignoring pictures other than svgs in Stress.cpp

The picture->size() function does not work for raw/png pictures.
As a consequence enabling both, the svg and png file loaders,
resulted in the unintended behavior of the example.
This commit is contained in:
Mira Grudzinska 2021-04-13 13:12:53 +02:00 committed by Hermet Park
parent 5d81fe2446
commit 0f9d3ff6e9

View file

@ -38,6 +38,10 @@ static double t1, t2, t3, t4;
void svgDirCallback(const char* name, const char* path, void* data)
{
//ignore if not svgs.
const char *ext = name + strlen(name) - 3;
if (strcmp(ext, "svg")) return;
auto picture = tvg::Picture::gen();
char buf[PATH_MAX];