Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@9002 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-05-04 07:01:15 +00:00
parent 1125d39de8
commit ecc9d28072
4 changed files with 13 additions and 14 deletions

View File

@ -440,28 +440,28 @@ class NormalizeBench : public SkBenchmark {
};
SkVector fVec[ARRAY];
bool fUsePortable;
public:
NormalizeBench(void* param, bool usePortable)
: INHERITED(param)
, fUsePortable(usePortable) {
SkRandom rand;
for (int i = 0; i < ARRAY; ++i) {
fVec[i].set(rand.nextSScalar1(), rand.nextSScalar1());
}
fName = "point_normalize";
fIsRendering = false;
}
// just so the compiler doesn't remove our loops
virtual void process(int) {}
protected:
virtual void onDraw(SkCanvas*) {
int accum = 0;
for (int j = 0; j < LOOP; ++j) {
for (int i = 0; i < ARRAY; ++i) {
accum += fVec[i].normalize();
@ -469,14 +469,14 @@ protected:
this->process(accum);
}
}
virtual const char* onGetName() {
return fName;
}
private:
const char* fName;
typedef SkBenchmark INHERITED;
};

View File

@ -117,4 +117,3 @@ static BenchRegistry gReg25(Fact25);
static BenchRegistry gReg26(Fact26);
static BenchRegistry gReg27(Fact27);
static BenchRegistry gReg28(Fact28);

View File

@ -78,7 +78,7 @@ public:
*/
kES_EXT_MsToTexture_MSFBOType,
kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType
kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType
};
enum FBFetchType {

View File

@ -46,7 +46,7 @@ static void test_length(skiatest::Reporter* reporter, SkScalar x, SkScalar y,
//See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(s1, s2));
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(s1, expectedLength));
test_Normalize(reporter, x, y);
}
@ -66,7 +66,7 @@ template <typename T> T get_value(skiatest::Reporter* reporter, T value) {
static void test_overflow(skiatest::Reporter* reporter) {
SkScalar bigFloat = get_value(reporter, SkFloatToScalar(3.4e38f));
SkPoint pt = { bigFloat, bigFloat };
SkScalar length = pt.length();
// expect this to be non-finite, but dump the results if not.
if (SkScalarIsFinite(length)) {
@ -106,7 +106,7 @@ static void PointTest(skiatest::Reporter* reporter) {
{ SkIntToScalar(3), SkIntToScalar(4), SkIntToScalar(5) },
{ SkFloatToScalar(0.6f), SkFloatToScalar(0.8f), SK_Scalar1 },
};
for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
test_length(reporter, gRec[i].fX, gRec[i].fY, gRec[i].fLength);
}