| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrAALinearizingConvexPathRenderer.h" | 9 #include "GrAALinearizingConvexPathRenderer.h" |
| 10 | 10 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 } | 311 } |
| 312 AAFlatteningConvexPathBatch::Geometry geometry; | 312 AAFlatteningConvexPathBatch::Geometry geometry; |
| 313 geometry.fColor = color; | 313 geometry.fColor = color; |
| 314 geometry.fViewMatrix = vm; | 314 geometry.fViewMatrix = vm; |
| 315 geometry.fPath = path; | 315 geometry.fPath = path; |
| 316 geometry.fStrokeWidth = stroke.isFillStyle() ? -1.0f : stroke.getWidth(); | 316 geometry.fStrokeWidth = stroke.isFillStyle() ? -1.0f : stroke.getWidth(); |
| 317 geometry.fJoin = stroke.isFillStyle() ? SkPaint::Join::kMiter_Join : stroke.
getJoin(); | 317 geometry.fJoin = stroke.isFillStyle() ? SkPaint::Join::kMiter_Join : stroke.
getJoin(); |
| 318 geometry.fMiterLimit = stroke.getMiter(); | 318 geometry.fMiterLimit = stroke.getMiter(); |
| 319 | 319 |
| 320 SkAutoTUnref<GrBatch> batch(AAFlatteningConvexPathBatch::Create(geometry)); | 320 SkAutoTUnref<GrBatch> batch(AAFlatteningConvexPathBatch::Create(geometry)); |
| 321 target->drawBatch(pipelineBuilder, batch); | 321 target->drawBatch(*pipelineBuilder, batch); |
| 322 | 322 |
| 323 return true; | 323 return true; |
| 324 } | 324 } |
| 325 | 325 |
| 326 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 326 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 327 | 327 |
| 328 #ifdef GR_TEST_UTILS | 328 #ifdef GR_TEST_UTILS |
| 329 | 329 |
| 330 BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { | 330 BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { |
| 331 AAFlatteningConvexPathBatch::Geometry geometry; | 331 AAFlatteningConvexPathBatch::Geometry geometry; |
| 332 geometry.fColor = GrRandomColor(random); | 332 geometry.fColor = GrRandomColor(random); |
| 333 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 333 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
| 334 geometry.fPath = GrTest::TestPathConvex(random); | 334 geometry.fPath = GrTest::TestPathConvex(random); |
| 335 | 335 |
| 336 return AAFlatteningConvexPathBatch::Create(geometry); | 336 return AAFlatteningConvexPathBatch::Create(geometry); |
| 337 } | 337 } |
| 338 | 338 |
| 339 #endif | 339 #endif |
| OLD | NEW |