Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2534)

Unified Diff: src/gpu/batches/GrAAFillRectBatch.cpp

Issue 1289203004: fix valgrind issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index a483f4d0c9137715effe8e02bc79a0b41cda8259..94cc5ce635397eda7a6d3a16684874703d8ebd13 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698