aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/RectBench.cpp
diff options
context:
space:
mode:
authorGravatar agl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-04-26 21:47:25 +0000
committerGravatar agl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-04-26 21:47:25 +0000
commit6fd950ca5c40ff4c537ec850086ce76fc51bf316 (patch)
tree9786c63eb00f1fcff167c4b07b69b700e2493782 /bench/RectBench.cpp
parente932a42ddbebb3ad8303fed8e58db6a68590082d (diff)
Revert "Use hairline when line width <= 1.0, instead of < 1.0."
This reverts commit r538 for the moment. In order to roll Chrome to include some bug fixes, I want to land it in between this revert, and the revert revert. That way the baseline changes from the other revisions can be considered without conflating the huge number of changes due to r538. git-svn-id: http://skia.googlecode.com/svn/trunk@560 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/RectBench.cpp')
-rw-r--r--bench/RectBench.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index 3874bb3fc7..6f34eb5638 100644
--- a/bench/RectBench.cpp
+++ b/bench/RectBench.cpp
@@ -89,20 +89,14 @@ public:
protected:
virtual void onDraw(SkCanvas* canvas) {
- SkScalar gSizes[] = {
+ static const SkScalar gSizes[] = {
SkIntToScalar(7), 0
};
- size_t sizes = SK_ARRAY_COUNT(gSizes);
-
- if (this->hasStrokeWidth()) {
- gSizes[0] = this->getStrokeWidth();
- sizes = 1;
- }
SkPaint paint;
paint.setStrokeCap(SkPaint::kRound_Cap);
-
- for (size_t i = 0; i < sizes; i++) {
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gSizes); i++) {
paint.setStrokeWidth(gSizes[i]);
this->setupPaint(&paint);
canvas->drawPoints(fMode, N * 2,
@@ -138,3 +132,4 @@ static BenchRegistry gRRectReg2(RRectFactory2);
static BenchRegistry gPointsReg(PointsFactory);
static BenchRegistry gLinesReg(LinesFactory);
static BenchRegistry gPolygonReg(PolygonFactory);
+