OLD | NEW |
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 Loading... |
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 |
OLD | NEW |