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

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

Issue 1506823004: Remove drawPathsFromRange from GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting 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 | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 RETURN_IF_ABANDONED 129 RETURN_IF_ABANDONED
130 SkDEBUGCODE(this->validate();) 130 SkDEBUGCODE(this->validate();)
131 131
132 if (!fTextContext) { 132 if (!fTextContext) {
133 fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget ); 133 fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget );
134 } 134 }
135 135
136 fTextContext->drawTextBlob(this, clip, skPaint, viewMatrix, blob, x, y, filt er, clipBounds); 136 fTextContext->drawTextBlob(this, clip, skPaint, viewMatrix, blob, x, y, filt er, clipBounds);
137 } 137 }
138 138
139 void GrDrawContext::drawPathsFromRange(const GrPipelineBuilder* pipelineBuilder,
140 const SkMatrix& viewMatrix,
141 const SkMatrix& localMatrix,
142 GrColor color,
143 GrPathRange* range,
144 GrPathRangeDraw* draw,
145 int /*GrPathRendering::FillType*/ fill,
146 const SkRect& bounds) {
147 RETURN_IF_ABANDONED
148 SkDEBUGCODE(this->validate();)
149
150 this->getDrawTarget()->drawPathsFromRange(*pipelineBuilder, viewMatrix, loca lMatrix, color,
151 range, draw, (GrPathRendering::Fil lType) fill,
152 bounds);
153 }
154
155 void GrDrawContext::discard() { 139 void GrDrawContext::discard() {
156 RETURN_IF_ABANDONED 140 RETURN_IF_ABANDONED
157 SkDEBUGCODE(this->validate();) 141 SkDEBUGCODE(this->validate();)
158 142
159 AutoCheckFlush acf(fDrawingManager); 143 AutoCheckFlush acf(fDrawingManager);
160 this->getDrawTarget()->discard(fRenderTarget); 144 this->getDrawTarget()->discard(fRenderTarget);
161 } 145 }
162 146
163 void GrDrawContext::clear(const SkIRect* rect, 147 void GrDrawContext::clear(const SkIRect* rect,
164 const GrColor color, 148 const GrColor color,
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 const GrPaint& paint, GrDrawBatch* batch) { 615 const GrPaint& paint, GrDrawBatch* batch) {
632 RETURN_IF_ABANDONED 616 RETURN_IF_ABANDONED
633 SkDEBUGCODE(this->validate();) 617 SkDEBUGCODE(this->validate();)
634 618
635 AutoCheckFlush acf(fDrawingManager); 619 AutoCheckFlush acf(fDrawingManager);
636 620
637 GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip); 621 GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip);
638 this->getDrawTarget()->drawBatch(pipelineBuilder, batch); 622 this->getDrawTarget()->drawBatch(pipelineBuilder, batch);
639 } 623 }
640 624
625 void GrDrawContext::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
626 GrDrawPathBatchBase* batch) {
627 RETURN_IF_ABANDONED
628 SkDEBUGCODE(this->validate();)
629
630 AutoCheckFlush acf(fDrawingManager);
631
632 this->getDrawTarget()->drawPathBatch(pipelineBuilder, batch);
633 }
634
641 void GrDrawContext::drawPath(const GrClip& clip, 635 void GrDrawContext::drawPath(const GrClip& clip,
642 const GrPaint& paint, 636 const GrPaint& paint,
643 const SkMatrix& viewMatrix, 637 const SkMatrix& viewMatrix,
644 const SkPath& path, 638 const SkPath& path,
645 const GrStrokeInfo& strokeInfo) { 639 const GrStrokeInfo& strokeInfo) {
646 RETURN_IF_ABANDONED 640 RETURN_IF_ABANDONED
647 SkDEBUGCODE(this->validate();) 641 SkDEBUGCODE(this->validate();)
648 642
649 if (path.isEmpty()) { 643 if (path.isEmpty()) {
650 if (path.isInverseFillType()) { 644 if (path.isInverseFillType()) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 args.fAntiAlias = useCoverageAA; 790 args.fAntiAlias = useCoverageAA;
797 pr->drawPath(args); 791 pr->drawPath(args);
798 } 792 }
799 793
800 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 794 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
801 RETURN_IF_ABANDONED 795 RETURN_IF_ABANDONED
802 SkDEBUGCODE(this->validate();) 796 SkDEBUGCODE(this->validate();)
803 797
804 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); 798 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch);
805 } 799 }
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698