| 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" |
| 11 #include "GrBatchFlushState.h" | 11 #include "GrBatchFlushState.h" |
| 12 #include "GrBatchTest.h" | 12 #include "GrBatchTest.h" |
| 13 #include "GrClip.h" | 13 #include "GrClip.h" |
| 14 #include "GrDefaultGeoProcFactory.h" | 14 #include "GrDefaultGeoProcFactory.h" |
| 15 #include "GrDrawTarget.h" | 15 #include "GrDrawTarget.h" |
| 16 #include "GrMesh.h" | 16 #include "GrMesh.h" |
| 17 #include "GrPathUtils.h" | 17 #include "GrPathUtils.h" |
| 18 #include "GrPipelineBuilder.h" | 18 #include "GrPipelineBuilder.h" |
| 19 #include "GrResourceCache.h" | 19 #include "GrResourceCache.h" |
| 20 #include "GrResourceProvider.h" | 20 #include "GrResourceProvider.h" |
| 21 #include "GrTessellator.h" | 21 #include "GrTessellator.h" |
| 22 #include "SkGeometry.h" | 22 #include "SkGeometry.h" |
| 23 | 23 |
| 24 #include "batches/GrVertexBatch.h" | 24 #include "batches/GrVertexBatch.h" |
| 25 | 25 |
| 26 #include <stdio.h> | 26 #include <stdio.h> |
| 27 | 27 |
| 28 #define SK_DISABLE_SCREENSPACE_TESS_AA_PATH_RENDERER | |
| 29 | |
| 30 /* | 28 /* |
| 31 * This path renderer tessellates the path into triangles using GrTessellator, u
ploads the | 29 * This path renderer tessellates the path into triangles using GrTessellator, u
ploads the |
| 32 * triangles to a vertex buffer, and renders them with a single draw call. It ca
n do screenspace | 30 * triangles to a vertex buffer, and renders them with a single draw call. It ca
n do screenspace |
| 33 * antialiasing with a one-pixel coverage ramp. | 31 * antialiasing with a one-pixel coverage ramp. |
| 34 */ | 32 */ |
| 35 namespace { | 33 namespace { |
| 36 | 34 |
| 37 struct TessInfo { | 35 struct TessInfo { |
| 38 SkScalar fTolerance; | 36 SkScalar fTolerance; |
| 39 int fCount; | 37 int fCount; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 bool antiAlias = random->nextBool(); | 383 bool antiAlias = random->nextBool(); |
| 386 GrStyle style; | 384 GrStyle style; |
| 387 do { | 385 do { |
| 388 GrTest::TestStyle(random, &style); | 386 GrTest::TestStyle(random, &style); |
| 389 } while (!style.isSimpleFill()); | 387 } while (!style.isSimpleFill()); |
| 390 GrShape shape(path, style); | 388 GrShape shape(path, style); |
| 391 return TessellatingPathBatch::Create(color, shape, viewMatrix, devClipBounds
, antiAlias); | 389 return TessellatingPathBatch::Create(color, shape, viewMatrix, devClipBounds
, antiAlias); |
| 392 } | 390 } |
| 393 | 391 |
| 394 #endif | 392 #endif |
| OLD | NEW |