Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: src/gpu/GrDrawContext.cpp

Issue 2281653002: Respecify SkCanvas::drawArc, consolidate conversion to SkPath, add GM for oddball drawArcs (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkPathPriv.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkPathPriv.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698