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

Side by Side Diff: src/gpu/GrAADistanceFieldPathRenderer.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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.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 2014 Google Inc. 3 * Copyright 2014 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 "GrAADistanceFieldPathRenderer.h" 9 #include "GrAADistanceFieldPathRenderer.h"
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBil erp_FilterMode); 182 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBil erp_FilterMode);
183 183
184 // Setup GrGeometryProcessor 184 // Setup GrGeometryProcessor
185 GrBatchAtlas* atlas = fAtlas; 185 GrBatchAtlas* atlas = fAtlas;
186 SkAutoTUnref<GrGeometryProcessor> dfProcessor( 186 SkAutoTUnref<GrGeometryProcessor> dfProcessor(
187 GrDistanceFieldPathGeoProc::Create(this->color(), 187 GrDistanceFieldPathGeoProc::Create(this->color(),
188 this->viewMatrix(), 188 this->viewMatrix(),
189 atlas->getTexture(), 189 atlas->getTexture(),
190 params, 190 params,
191 flags)); 191 flags,
192 false));
192 193
193 this->initDraw(batchTarget, dfProcessor, pipeline); 194 this->initDraw(batchTarget, dfProcessor, pipeline);
194 195
195 // allocate vertices 196 // allocate vertices
196 size_t vertexStride = dfProcessor->getVertexStride(); 197 size_t vertexStride = dfProcessor->getVertexStride();
197 SkASSERT(vertexStride == 2 * sizeof(SkPoint)); 198 SkASSERT(vertexStride == 2 * sizeof(SkPoint));
198 199
199 int vertexCount = GrBatchTarget::kVertsPerRect * instanceCount; 200 int vertexCount = GrBatchTarget::kVertsPerRect * instanceCount;
200 201
201 const GrVertexBuffer* vertexBuffer; 202 const GrVertexBuffer* vertexBuffer;
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color , viewMatrix, 607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color , viewMatrix,
607 fAtlas, &fPathC ache, &fPathList)); 608 fAtlas, &fPathC ache, &fPathList));
608 609
609 SkRect bounds = path.getBounds(); 610 SkRect bounds = path.getBounds();
610 viewMatrix.mapRect(&bounds); 611 viewMatrix.mapRect(&bounds);
611 target->drawBatch(pipelineBuilder, batch, &bounds); 612 target->drawBatch(pipelineBuilder, batch, &bounds);
612 613
613 return true; 614 return true;
614 } 615 }
615 616
OLDNEW
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698