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

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

Issue 1110993002: Revert of removing equality / compute invariant loops from GrGeometryProcessors (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup1
Patch Set: Created 5 years, 7 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/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrGeometryProcessor.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 fBatch.fUsesLocalCoords = init.fUsesLocalCoords; 248 fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
249 fBatch.fCoverageIgnored = init.fCoverageIgnored; 249 fBatch.fCoverageIgnored = init.fCoverageIgnored;
250 } 250 }
251 251
252 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override { 252 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override {
253 SkAutoTUnref<const GrGeometryProcessor> gp( 253 SkAutoTUnref<const GrGeometryProcessor> gp(
254 GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPositi on_GPType, 254 GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPositi on_GPType,
255 this->color(), 255 this->color(),
256 this->viewMatrix(), 256 this->viewMatrix(),
257 SkMatrix::I(), 257 SkMatrix::I(),
258 false,
258 this->coverage())); 259 this->coverage()));
259 260
260 size_t vertexStride = gp->getVertexStride(); 261 size_t vertexStride = gp->getVertexStride();
261 SkASSERT(vertexStride == sizeof(SkPoint)); 262 SkASSERT(vertexStride == sizeof(SkPoint));
262 263
263 batchTarget->initDraw(gp, pipeline); 264 batchTarget->initDraw(gp, pipeline);
264 265
265 // TODO this is hacky, but the only way we have to initialize the GP is to use the 266 // TODO this is hacky, but the only way we have to initialize the GP is to use the
266 // GrPipelineInfo struct so we can generate the correct shader. Once we have GrBatch 267 // GrPipelineInfo struct so we can generate the correct shader. Once we have GrBatch
267 // everywhere we can remove this nastiness 268 // everywhere we can remove this nastiness
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 745
745 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, 746 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target,
746 GrPipelineBuilder* pipelineBuilder, 747 GrPipelineBuilder* pipelineBuilder,
747 const SkMatrix& viewMatrix, 748 const SkMatrix& viewMatrix,
748 const SkPath& path, 749 const SkPath& path,
749 const GrStrokeInfo& stroke) { 750 const GrStrokeInfo& stroke) {
750 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); 751 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType());
751 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); 752 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType());
752 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p ath, stroke, true); 753 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p ath, stroke, true);
753 } 754 }
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698