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

Side by Side Diff: src/gpu/batches/GrTessellatingPathRenderer.cpp

Issue 2289143006: Fix ASAN int overflow error in GLProgramsTest (Closed)
Patch Set: Created 4 years, 3 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 "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrAuditTrail.h" 10 #include "GrAuditTrail.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 374
375 //////////////////////////////////////////////////////////////////////////////// /////////////////// 375 //////////////////////////////////////////////////////////////////////////////// ///////////////////
376 376
377 #ifdef GR_TEST_UTILS 377 #ifdef GR_TEST_UTILS
378 378
379 DRAW_BATCH_TEST_DEFINE(TesselatingPathBatch) { 379 DRAW_BATCH_TEST_DEFINE(TesselatingPathBatch) {
380 GrColor color = GrRandomColor(random); 380 GrColor color = GrRandomColor(random);
381 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 381 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
382 SkPath path = GrTest::TestPath(random); 382 SkPath path = GrTest::TestPath(random);
383 SkIRect devClipBounds = SkIRect::MakeXYWH( 383 SkIRect devClipBounds = SkIRect::MakeLTRB(
384 random->nextU(), random->nextU(), random->nextU(), random->nextU()); 384 random->nextU(), random->nextU(), random->nextU(), random->nextU());
385 devClipBounds.sort();
385 bool antiAlias = random->nextBool(); 386 bool antiAlias = random->nextBool();
386 GrStyle style; 387 GrStyle style;
387 do { 388 do {
388 GrTest::TestStyle(random, &style); 389 GrTest::TestStyle(random, &style);
389 } while (!style.isSimpleFill()); 390 } while (!style.isSimpleFill());
390 GrShape shape(path, style); 391 GrShape shape(path, style);
391 return TessellatingPathBatch::Create(color, shape, viewMatrix, devClipBounds , antiAlias); 392 return TessellatingPathBatch::Create(color, shape, viewMatrix, devClipBounds , antiAlias);
392 } 393 }
393 394
394 #endif 395 #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