show the hairlines after each test iteration
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 25 Aug 2009 20:40:04 +0000 (20:40 +0000)
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 25 Aug 2009 20:40:04 +0000 (20:40 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@337 2bbb7eff-a529-9590-31e7-b0007b416f81

samplecode/SampleHairline.cpp

index 9763d0f..3285d08 100644 (file)
@@ -79,8 +79,8 @@ static bool check_bitmap_margin(const SkBitmap& bm, int margin) {
     return true;
 }
 
-#define WIDTH   80
-#define HEIGHT  60
+#define WIDTH   400
+#define HEIGHT  300
 #define MARGIN  4
 
 class HairlineView : public SkView {
@@ -131,7 +131,7 @@ protected:
         SkCanvas c2(bm2);
         SkPaint paint;
         paint.setAntiAlias(true);
-        for (int i = 0; i < 10000; i++) {
+        for (int i = 0; i < 400; i++) {
             SkPoint pts[2];
             generate_pts(pts, 2, WIDTH, HEIGHT);
             bm2.eraseColor(0);
@@ -141,6 +141,7 @@ protected:
                          pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY);
                 break;
             }
+            canvas->drawBitmap(bm2, SkIntToScalar(10), SkIntToScalar(10), NULL);
         }
         
         this->inval(NULL);