More PathUtilsTest.cpp nits

Reordered the includes, changed define to a constant global var.





more PathUtils Nits

BUG=
R=robertphillips@google.com, tfarina@chromium.org

Author: dierk@google.com

Review URL: https://chromiumcodereview.appspot.com/19272014

git-svn-id: http://skia.googlecode.com/svn/trunk@10110 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-07-16 17:39:08 +00:00
parent ffcbdbfe6a
commit b92f9fb0f5

View File

@ -6,18 +6,18 @@
* found in the LICENSE file.
*/
#include "Test.h"
#include "SkPathUtils.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkPathUtils.h"
#include "SkRandom.h"
#include "SkTime.h"
#define SK_NUM_IT 100
#include "Test.h"
class SkBitmap;
const int kNumIt = 100;
static void fill_random_bits( int chars, char* bits ){
SkMWCRandom rand(SkTime::GetMSecs());
@ -32,6 +32,7 @@ static int get_bit( const char* buffer, int x ) {
return buffer[byte] & (128 >> bit);
}
/* // useful for debugging errors
#include <iostream>
static void print_bits( const char* bits, int w, int h) {
@ -57,7 +58,7 @@ static void print_bmp( SkBitmap* bmp, int w, int h){
}
std::cout << std::endl;
}
}
}
*/
static void binary_to_skbitmap(const char* bin_bmp, SkBitmap* sk_bmp,
@ -139,7 +140,7 @@ static void TestPathUtils(skiatest::Reporter* reporter) {
static char* binBmp = &bits[0];
//loop to run randomized test lots of times
for (int it = 0; it < SK_NUM_IT; ++it)
for (int it = 0; it < kNumIt; ++it)
{
// generate a random binary bitmap
fill_random_bits( h * rowBytes, binBmp); // generate random bitmap