summaryrefslogtreecommitdiffstatsci
path: root/src/skia-tests/rectangles.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2014-06-11 18:41:22 -0700
committerBryce Harrington <b.harrington@samsung.com>2014-06-12 13:52:59 -0700
commit13690032ef2bbbe68ff9a66179eb8c03f20c0942 (patch)
tree7865b79a81097571cf10ec0bb16db10366dd3b8a /src/skia-tests/rectangles.cpp
parent99227b95316c38f47192891081a0c7ca99c813ad (diff)
canvas_perf: Run the rect testcase
Diffstat (limited to 'src/skia-tests/rectangles.cpp')
-rw-r--r--src/skia-tests/rectangles.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/skia-tests/rectangles.cpp b/src/skia-tests/rectangles.cpp
deleted file mode 100644
index ebe9e43..0000000
--- a/src/skia-tests/rectangles.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2014 © Samsung Research America, Silicon Valley
- *
- * Use of this source code is governed by the 3-Clause BSD license
- * specified in the COPYING file included with this source code.
- */
-#include <config.h>
-
-#include <math.h>
-
-#include <SkCanvas.h>
-#include <SkPaint.h>
-#include <SkRect.h>
-
-#include "caskbench.h"
-#include "caskbench_context.h"
-#include "skia-shapes.h"
-
-int
-sk_setup_rectangles(caskbench_context_t *ctx)
-{
- ctx->skia_paint->setAntiAlias(false);
- ctx->skia_paint->setStrokeWidth(1);
- ctx->skia_paint->setStyle(SkPaint::kStroke_Style);
- return 1;
-}
-
-void
-sk_teardown_rectangles(void)
-{
-}
-
-int
-sk_test_rectangles(caskbench_context_t *ctx)
-{
- int i, x, y, w, h;
- SkRect rect;
-
- for (i=0; i<ctx->size; i++) {
- skiaRandomizePaintColor(ctx);
- w = trunc( (0.5*(double)ctx->canvas_width*rand())/RAND_MAX ) + 1;
- h = trunc( (0.5*(double)ctx->canvas_height*rand())/RAND_MAX ) + 1;
- x = trunc( (0.5*(double)ctx->canvas_width*rand())/RAND_MAX );
- y = trunc( (0.5*(double)ctx->canvas_height*rand())/RAND_MAX );
- rect.set(x, y, x+w, y+h);
-
- ctx->skia_canvas->drawRect(rect, *(ctx->skia_paint));
- }
-
- return 1;
-}
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :