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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrAAFillRectBatch.h" 8 #include "GrAAFillRectBatch.h"
9 9
10 #include "GrColor.h" 10 #include "GrColor.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 434
435 }; 435 };
436 436
437 //////////////////////////////////////////////////////////////////////////////// /////////////////// 437 //////////////////////////////////////////////////////////////////////////////// ///////////////////
438 438
439 #ifdef GR_TEST_UTILS 439 #ifdef GR_TEST_UTILS
440 440
441 #include "GrBatchTest.h" 441 #include "GrBatchTest.h"
442 442
443 DRAW_BATCH_TEST_DEFINE(AAFillRectBatch) { 443 DRAW_BATCH_TEST_DEFINE(AAFillRectBatch) {
444 AAFillRectBatchNoLocalMatrix* batch = AAFillRectBatchNoLocalMatrix::Create() ; 444 GrColor color = GrRandomColor(random);
445 AAFillRectBatchNoLocalMatrix::Geometry& geo = *batch->geometry(); 445 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
446 geo.fColor = GrRandomColor(random); 446 SkRect rect = GrTest::TestRect(random);
447 geo.fViewMatrix = GrTest::TestMatrix(random); 447 SkRect devRect = GrTest::TestRect(random);
448 geo.fDevRect = GrTest::TestRect(random); 448 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
449 batch->init();
450 return batch;
451 } 449 }
452 450
453 DRAW_BATCH_TEST_DEFINE(AAFillRectBatchLocalMatrix) { 451 DRAW_BATCH_TEST_DEFINE(AAFillRectBatchLocalMatrix) {
454 AAFillRectBatchLocalMatrix* batch = AAFillRectBatchLocalMatrix::Create(); 452 GrColor color = GrRandomColor(random);
455 AAFillRectBatchLocalMatrix::Geometry& geo = *batch->geometry(); 453 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
456 geo.fColor = GrRandomColor(random); 454 SkMatrix localMatrix = GrTest::TestMatrix(random);
457 geo.fViewMatrix = GrTest::TestMatrix(random); 455 SkRect rect = GrTest::TestRect(random);
458 geo.fLocalMatrix = GrTest::TestMatrix(random); 456 SkRect devRect = GrTest::TestRect(random);
459 geo.fDevRect = GrTest::TestRect(random); 457 return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect, devRe ct);
460 batch->init();
461 return batch;
462 } 458 }
463 459
464 #endif 460 #endif
OLDNEW
« 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