]> granicus.if.org Git - libass/commitdiff
Test program: nicer-looking background
authorGrigori Goronzy <greg@blackbox>
Wed, 24 Jun 2009 22:05:04 +0000 (00:05 +0200)
committerGrigori Goronzy <greg@blackbox>
Wed, 24 Jun 2009 22:05:04 +0000 (00:05 +0200)
Use a uniformly colored background in the test program. This looks
better than the randomly-looking pattern that was used before.
A chessboard pattern would be even better, but this will do for now.

test/test.cpp

index ea70acc058c91cd305b0fde0044dd0295cad2c9b..4b39110d0913ec7cda15d1453ca02bae5477045f 100644 (file)
@@ -88,8 +88,9 @@ static image_t* gen_image(int width, int height) {
   img->height = height;
   img->stride = width * 3;
   img->buffer = (unsigned char*)calloc(1, height * width * 3);
-  for (int i = 0; i < height * width * 3; ++i)
-   img->buffer[i] = (i/3/50) % 100;
+  memset(img->buffer, 63, img->stride * img->height);
+  //for (int i = 0; i < height * width * 3; ++i)
+  // img->buffer[i] = (i/3/50) % 100;
   return img;
 }