summaryrefslogtreecommitdiffstatsci
path: root/src/skia-tests/stroke.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2013-11-12 17:43:33 -0800
committerBryce Harrington <b.harrington@samsung.com>2013-11-13 13:19:18 -0800
commit8eb35dc7db018b9187c30454604fcfd88a8dadca (patch)
tree9de49eb6b28f1b68cef554c439a9fd1ee7d8be59 /src/skia-tests/stroke.cpp
parent2a225586241a5a77afbc555d7ee77fbbf420cc1c (diff)
Add a --cairo-surface-type parameter to choose image or glx surfaces
This eventually will need replaced with something better, but should do for now.
Diffstat (limited to 'src/skia-tests/stroke.cpp')
-rw-r--r--src/skia-tests/stroke.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/skia-tests/stroke.cpp b/src/skia-tests/stroke.cpp
index fe2b095..ee74bb4 100644
--- a/src/skia-tests/stroke.cpp
+++ b/src/skia-tests/stroke.cpp
@@ -9,12 +9,14 @@
#include "caskbench.h"
static SkRect r;
+static int line_length;
int
sk_setup_stroke(caskbench_context_t *ctx)
{
ctx->paint->setARGB(255, 255, 255, 255);
r.set(10, 10, 20, 20);
+ line_length = 60;
return 1;
}
@@ -29,7 +31,7 @@ sk_test_stroke(caskbench_context_t *ctx)
w = ((double)ctx->size*rand())/RAND_MAX + 1;
x += 4 + (prev_w + w)/2.0;
ctx->paint->setStrokeWidth(w);
- ctx->canvas->drawLine(x,10, x,70, *(ctx->paint));
+ ctx->canvas->drawLine(x,10, x,10+line_length, *(ctx->paint));
prev_w = w;
}