Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(863)

Unified Diff: tests/GpuRectanizerTest.cpp

Issue 319523003: Add bench for rectanizers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Actually use bench loops parameter Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/bench.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GpuRectanizerTest.cpp
diff --git a/tests/GpuRectanizerTest.cpp b/tests/GpuRectanizerTest.cpp
index ec396ef863dfe9351ed72aa3a76ce9b57b9899df..2ee641e9161fa78346396860c6fc54b39385b9db 100644
--- a/tests/GpuRectanizerTest.cpp
+++ b/tests/GpuRectanizerTest.cpp
@@ -14,8 +14,8 @@
#include "SkTDArray.h"
#include "Test.h"
-static const int kWidth = 1000;
-static const int kHeight = 1000;
+static const int kWidth = 1024;
+static const int kHeight = 1024;
// Basic test of a GrRectanizer-derived class' functionality
static void test_rectanizer_basic(skiatest::Reporter* reporter, GrRectanizer* rectanizer) {
@@ -59,16 +59,16 @@ static void test_pow2(skiatest::Reporter* reporter, const SkTDArray<SkISize>& re
}
DEF_GPUTEST(GpuRectanizer, reporter, factory) {
- SkTDArray<SkISize> fRects;
+ SkTDArray<SkISize> rects;
bsalomon 2014/06/05 14:02:01 why this change?
robertphillips 2014/06/05 14:07:06 It is just a method variable not a member variable
bsalomon 2014/06/05 14:07:47 Oh, right, duh. lgtm
SkRandom rand;
for (int i = 0; i < 50; i++) {
- fRects.push(SkISize::Make(rand.nextRangeU(1, kWidth / 2),
- rand.nextRangeU(1, kHeight / 2)));
+ rects.push(SkISize::Make(rand.nextRangeU(1, kWidth / 2),
+ rand.nextRangeU(1, kHeight / 2)));
}
- test_skyline(reporter, fRects);
- test_pow2(reporter, fRects);
+ test_skyline(reporter, rects);
+ test_pow2(reporter, rects);
}
#endif
« no previous file with comments | « gyp/bench.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698