aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/MatrixBench.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 13:36:47 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 13:36:47 +0000
commit31f8f73e83fad2241b1350d8d253c170e96e46ff (patch)
treeadebc17d73d28561267290eefc4108c6d20010d1 /bench/MatrixBench.cpp
parent968c17dddad328cd9e4bd3cb9dea2f47c206f231 (diff)
Fixed valgrind complaint in MatrixBench
Diffstat (limited to 'bench/MatrixBench.cpp')
-rw-r--r--bench/MatrixBench.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp
index 1a85172a40..b4715ba2cf 100644
--- a/bench/MatrixBench.cpp
+++ b/bench/MatrixBench.cpp
@@ -382,17 +382,17 @@ protected:
fMatrix.setPerspX(fMatrix.getPerspX());
}
SkMatrix inv;
- bool invertible =
- fMatrix.invert(&inv);
+ bool invertible = fMatrix.invert(&inv);
SkASSERT(invertible);
SkRect transformedRect;
+ // an arbitrary, small, non-zero rect to transform
+ SkRect srcRect = SkRect::MakeWH(SkIntToScalar(10), SkIntToScalar(10));
if (invertible) {
- inv.mapRect(&transformedRect, fRect);
+ inv.mapRect(&transformedRect, srcRect);
}
}
private:
SkMatrix fMatrix;
- SkRect fRect;
int fFlags;
unsigned fIteration;
typedef MatrixBench INHERITED;