| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 bool fCanTweakAlphaForCoverage; | 315 bool fCanTweakAlphaForCoverage; |
| 316 }; | 316 }; |
| 317 | 317 |
| 318 BatchTracker fBatch; | 318 BatchTracker fBatch; |
| 319 SkSTArray<1, Geometry, true> fGeoData; | 319 SkSTArray<1, Geometry, true> fGeoData; |
| 320 | 320 |
| 321 typedef GrVertexBatch INHERITED; | 321 typedef GrVertexBatch INHERITED; |
| 322 }; | 322 }; |
| 323 | 323 |
| 324 bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { | 324 bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { |
| 325 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), |
| 326 "GrAALinearizingConvexPathRenderer::onDrawPath"); |
| 325 if (args.fPath->isEmpty()) { | 327 if (args.fPath->isEmpty()) { |
| 326 return true; | 328 return true; |
| 327 } | 329 } |
| 328 AAFlatteningConvexPathBatch::Geometry geometry; | 330 AAFlatteningConvexPathBatch::Geometry geometry; |
| 329 geometry.fColor = args.fColor; | 331 geometry.fColor = args.fColor; |
| 330 geometry.fViewMatrix = *args.fViewMatrix; | 332 geometry.fViewMatrix = *args.fViewMatrix; |
| 331 geometry.fPath = *args.fPath; | 333 geometry.fPath = *args.fPath; |
| 332 geometry.fStrokeWidth = args.fStroke->isFillStyle() ? -1.0f : args.fStroke->
getWidth(); | 334 geometry.fStrokeWidth = args.fStroke->isFillStyle() ? -1.0f : args.fStroke->
getWidth(); |
| 333 geometry.fJoin = args.fStroke->isFillStyle() ? SkPaint::Join::kMiter_Join : | 335 geometry.fJoin = args.fStroke->isFillStyle() ? SkPaint::Join::kMiter_Join : |
| 334 args.fStroke->getJoin(); | 336 args.fStroke->getJoin(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 347 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { | 349 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { |
| 348 AAFlatteningConvexPathBatch::Geometry geometry; | 350 AAFlatteningConvexPathBatch::Geometry geometry; |
| 349 geometry.fColor = GrRandomColor(random); | 351 geometry.fColor = GrRandomColor(random); |
| 350 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 352 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
| 351 geometry.fPath = GrTest::TestPathConvex(random); | 353 geometry.fPath = GrTest::TestPathConvex(random); |
| 352 | 354 |
| 353 return AAFlatteningConvexPathBatch::Create(geometry); | 355 return AAFlatteningConvexPathBatch::Create(geometry); |
| 354 } | 356 } |
| 355 | 357 |
| 356 #endif | 358 #endif |
| OLD | NEW |