aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrAAFillRectBatch.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-08-14 09:01:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-14 09:01:21 -0700
commit090ae8e4547b6142e5b7dbcf441aed0d517fa960 (patch)
treef531a348651e2073d6909b16bc828db67ac9bcc0 /src/gpu/batches/GrAAFillRectBatch.cpp
parent40ac15a62e4e1aec9b4b6ea1cc4e92c2b8325aa7 (diff)
fix valgrind issue
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1289203004
Diffstat (limited to 'src/gpu/batches/GrAAFillRectBatch.cpp')
-rw-r--r--src/gpu/batches/GrAAFillRectBatch.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index a483f4d0c9..94cc5ce635 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -441,24 +441,20 @@ GrDrawBatch* Create(GrColor color,
#include "GrBatchTest.h"
DRAW_BATCH_TEST_DEFINE(AAFillRectBatch) {
- AAFillRectBatchNoLocalMatrix* batch = AAFillRectBatchNoLocalMatrix::Create();
- AAFillRectBatchNoLocalMatrix::Geometry& geo = *batch->geometry();
- geo.fColor = GrRandomColor(random);
- geo.fViewMatrix = GrTest::TestMatrix(random);
- geo.fDevRect = GrTest::TestRect(random);
- batch->init();
- return batch;
+ GrColor color = GrRandomColor(random);
+ SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
+ SkRect rect = GrTest::TestRect(random);
+ SkRect devRect = GrTest::TestRect(random);
+ return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
}
DRAW_BATCH_TEST_DEFINE(AAFillRectBatchLocalMatrix) {
- AAFillRectBatchLocalMatrix* batch = AAFillRectBatchLocalMatrix::Create();
- AAFillRectBatchLocalMatrix::Geometry& geo = *batch->geometry();
- geo.fColor = GrRandomColor(random);
- geo.fViewMatrix = GrTest::TestMatrix(random);
- geo.fLocalMatrix = GrTest::TestMatrix(random);
- geo.fDevRect = GrTest::TestRect(random);
- batch->init();
- return batch;
+ GrColor color = GrRandomColor(random);
+ SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
+ SkMatrix localMatrix = GrTest::TestMatrix(random);
+ SkRect rect = GrTest::TestRect(random);
+ SkRect devRect = GrTest::TestRect(random);
+ return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect, devRect);
}
#endif