corrected code for general test

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11962 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-03-23 22:31:32 +00:00
parent f6e20515b3
commit 2fc1fe2098
+6 -6
View File
@@ -183,7 +183,7 @@ test(Surface& s, uint32 width, uint32 height, BBitmap* testBitmap)
font.SetRotation(8.0); font.SetRotation(8.0);
// font.SetFamilyAndStyle(1); // font.SetFamilyAndStyle(1);
s.SetFont(font); s.SetFont(&font);
s.SetHighColor(91, 105, 98, 120); s.SetHighColor(91, 105, 98, 120);
s.SetDrawingMode(B_OP_OVER); s.SetDrawingMode(B_OP_OVER);
s.DrawString(string1, stringLocation1); s.DrawString(string1, stringLocation1);
@@ -210,7 +210,7 @@ test(Surface& s, uint32 width, uint32 height, BBitmap* testBitmap)
// s.DrawString("Hello Nurse!", stringLocation2); // s.DrawString("Hello Nurse!", stringLocation2);
// bitmap drawing // bitmap drawing
BRect testBitmapCrop(bitmap->Bounds()); BRect testBitmapCrop(testBitmap->Bounds());
testBitmapCrop.left += 20.0; testBitmapCrop.left += 20.0;
BRect testBitmapDestRect(testBitmapCrop); BRect testBitmapDestRect(testBitmapCrop);
testBitmapDestRect.OffsetBy(50, 20); testBitmapDestRect.OffsetBy(50, 20);
@@ -315,10 +315,10 @@ main(int argc, char **argv)
// reset bitmap contents // reset bitmap contents
memset(bitmap->Bits(), 255, bitmap->BitsLength()); memset(bitmap->Bits(), 255, bitmap->BitsLength());
// run test // run test
// painterNow += test(painter, width, height, testBitmap); painterNow += test(painter, width, height, testBitmap);
// painterNow += test_lines(painter, width, height); // painterNow += test_lines(painter, width, height);
// painterNow += test_straight_lines(painter, width, height); // painterNow += test_straight_lines(painter, width, height);
painterNow += test_ellipses(painter, width, height); // painterNow += test_ellipses(painter, width, height);
} }
fprintf(stdout, " %lld µsecs\n", painterNow / iterations); fprintf(stdout, " %lld µsecs\n", painterNow / iterations);
@@ -341,10 +341,10 @@ fprintf(stdout, " %lld µsecs\n", painterNow / iterations);
// reset bitmap contents // reset bitmap contents
memset(bitmap->Bits(), 255, bitmap->BitsLength()); memset(bitmap->Bits(), 255, bitmap->BitsLength());
// run test // run test
// viewNow += test(*view, width, height, testBitmap, ); viewNow += test(*view, width, height, testBitmap);
// viewNow += test_lines(*view, width, height); // viewNow += test_lines(*view, width, height);
// viewNow += test_straight_lines(*view, width, height); // viewNow += test_straight_lines(*view, width, height);
viewNow += test_ellipses(*view, width, height); // viewNow += test_ellipses(*view, width, height);
} }
bitmap->Unlock(); bitmap->Unlock();