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

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

Issue 1472333003: Clean up Ganesh path render a little bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ooops Created 5 years 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/gpu/GrBlurUtils.cpp ('k') | src/gpu/SkGpuDevice.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 /* 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 "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrBatchTest.h" 10 #include "GrBatchTest.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 const SkStrokeRec& stroke, 583 const SkStrokeRec& stroke,
584 SkRect rects[2]) { 584 SkRect rects[2]) {
585 SkASSERT(stroke.isFillStyle()); 585 SkASSERT(stroke.isFillStyle());
586 586
587 if (path.isInverseFillType()) { 587 if (path.isInverseFillType()) {
588 return false; 588 return false;
589 } 589 }
590 590
591 // TODO: this restriction could be lifted if we were willing to apply 591 // TODO: this restriction could be lifted if we were willing to apply
592 // the matrix to all the points individually rather than just to the rect 592 // the matrix to all the points individually rather than just to the rect
593 if (!viewMatrix.preservesAxisAlignment()) { 593 if (!viewMatrix.rectStaysRect()) {
594 return false; 594 return false;
595 } 595 }
596 596
597 SkPath::Direction dirs[2]; 597 SkPath::Direction dirs[2];
598 if (!path.isNestedFillRects(rects, dirs)) { 598 if (!path.isNestedFillRects(rects, dirs)) {
599 return false; 599 return false;
600 } 600 }
601 601
602 if (SkPath::kWinding_FillType == path.getFillType() && dirs[0] == dirs[1]) { 602 if (SkPath::kWinding_FillType == path.getFillType() && dirs[0] == dirs[1]) {
603 // The two rects need to be wound opposite to each other 603 // The two rects need to be wound opposite to each other
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 args.fAntiAlias = useCoverageAA; 796 args.fAntiAlias = useCoverageAA;
797 pr->drawPath(args); 797 pr->drawPath(args);
798 } 798 }
799 799
800 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 800 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
801 RETURN_IF_ABANDONED 801 RETURN_IF_ABANDONED
802 SkDEBUGCODE(this->validate();) 802 SkDEBUGCODE(this->validate();)
803 803
804 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); 804 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch);
805 } 805 }
OLDNEW
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698