| 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 "GrBatchTest.h" | 8 #include "GrBatchTest.h" |
| 9 #include "GrColor.h" | 9 #include "GrColor.h" |
| 10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 useCenter
, | 1016 useCenter
, |
| 1017 style, | 1017 style, |
| 1018 shaderCap
s)); | 1018 shaderCap
s)); |
| 1019 if (batch) { | 1019 if (batch) { |
| 1020 GrPipelineBuilder pipelineBuilder(paint, useHWAA); | 1020 GrPipelineBuilder pipelineBuilder(paint, useHWAA); |
| 1021 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch)
; | 1021 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch)
; |
| 1022 return; | 1022 return; |
| 1023 } | 1023 } |
| 1024 } | 1024 } |
| 1025 SkPath path; | 1025 SkPath path; |
| 1026 path.setIsVolatile(true); | 1026 SkPathPriv::CreateDrawArcPath(&path, oval, startAngle, sweepAngle, useCenter
, |
| 1027 if (useCenter) { | 1027 style.isSimpleFill()); |
| 1028 path.moveTo(oval.centerX(), oval.centerY()); | |
| 1029 } | |
| 1030 path.arcTo(oval, startAngle, sweepAngle, !useCenter); | |
| 1031 if (useCenter) { | |
| 1032 path.close(); | |
| 1033 } | |
| 1034 this->internalDrawPath(clip, paint, viewMatrix, path, style); | 1028 this->internalDrawPath(clip, paint, viewMatrix, path, style); |
| 1035 return; | 1029 return; |
| 1036 } | 1030 } |
| 1037 | 1031 |
| 1038 void GrDrawContext::drawImageLattice(const GrClip& clip, | 1032 void GrDrawContext::drawImageLattice(const GrClip& clip, |
| 1039 const GrPaint& paint, | 1033 const GrPaint& paint, |
| 1040 const SkMatrix& viewMatrix, | 1034 const SkMatrix& viewMatrix, |
| 1041 int imageWidth, | 1035 int imageWidth, |
| 1042 int imageHeight, | 1036 int imageHeight, |
| 1043 std::unique_ptr<SkLatticeIter> iter, | 1037 std::unique_ptr<SkLatticeIter> iter, |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 | 1339 |
| 1346 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr
Clip& clip, | 1340 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr
Clip& clip, |
| 1347 GrDrawBatch* batch) { | 1341 GrDrawBatch* batch) { |
| 1348 ASSERT_SINGLE_OWNER | 1342 ASSERT_SINGLE_OWNER |
| 1349 RETURN_IF_ABANDONED | 1343 RETURN_IF_ABANDONED |
| 1350 SkDEBUGCODE(this->validate();) | 1344 SkDEBUGCODE(this->validate();) |
| 1351 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); | 1345 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); |
| 1352 | 1346 |
| 1353 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); | 1347 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); |
| 1354 } | 1348 } |
| OLD | NEW |