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

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

Issue 1111603004: removing equality / compute invariant loops from GrGeometryProcessors (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup1
Patch Set: tweaks 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBil erp_FilterMode); 191 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBil erp_FilterMode);
192 192
193 // Setup GrGeometryProcessor 193 // Setup GrGeometryProcessor
194 GrBatchAtlas* atlas = fAtlas; 194 GrBatchAtlas* atlas = fAtlas;
195 SkAutoTUnref<GrGeometryProcessor> dfProcessor( 195 SkAutoTUnref<GrGeometryProcessor> dfProcessor(
196 GrDistanceFieldPathGeoProc::Create(this->color(), 196 GrDistanceFieldPathGeoProc::Create(this->color(),
197 this->viewMatrix(), 197 this->viewMatrix(),
198 atlas->getTexture(), 198 atlas->getTexture(),
199 params, 199 params,
200 flags, 200 flags));
201 false));
202 201
203 this->initDraw(batchTarget, dfProcessor, pipeline); 202 this->initDraw(batchTarget, dfProcessor, pipeline);
204 203
205 FlushInfo flushInfo; 204 FlushInfo flushInfo;
206 205
207 // allocate vertices 206 // allocate vertices
208 size_t vertexStride = dfProcessor->getVertexStride(); 207 size_t vertexStride = dfProcessor->getVertexStride();
209 SkASSERT(vertexStride == 2 * sizeof(SkPoint)); 208 SkASSERT(vertexStride == 2 * sizeof(SkPoint));
210 209
211 const GrVertexBuffer* vertexBuffer; 210 const GrVertexBuffer* vertexBuffer;
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 geometry.fPath = GrTest::TestPath(random); 670 geometry.fPath = GrTest::TestPath(random);
672 geometry.fAntiAlias = random->nextBool(); 671 geometry.fAntiAlias = random->nextBool();
673 672
674 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, 673 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix,
675 gTestStruct.fAtlas, 674 gTestStruct.fAtlas,
676 &gTestStruct.fPathCache, 675 &gTestStruct.fPathCache,
677 &gTestStruct.fPathList); 676 &gTestStruct.fPathList);
678 } 677 }
679 678
680 #endif 679 #endif
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