fix valgrind issue

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1289203004
This commit is contained in:
joshualitt 2015-08-14 09:01:21 -07:00 committed by Commit bot
parent 40ac15a62e
commit 090ae8e454

View File

@ -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