From: robertphillips@google.com Date: Mon, 17 Sep 2012 13:36:47 +0000 (+0000) Subject: Fixed valgrind complaint in MatrixBench X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~14820 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31f8f73e83fad2241b1350d8d253c170e96e46ff;p=platform%2Fupstream%2FlibSkiaSharp.git Fixed valgrind complaint in MatrixBench https://codereview.appspot.com/6492129/ git-svn-id: http://skia.googlecode.com/svn/trunk@5566 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp index 1a85172..b4715ba 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;