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 1075543002: Rename the distance field geoprocs to something more reasonable. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix line wrap Created 5 years, 8 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 | « no previous file | src/gpu/GrDistanceFieldTextContext.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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 uint32_t flags = 0; 179 uint32_t flags = 0;
180 flags |= this->viewMatrix().isSimilarity() ? kSimilarity_DistanceFieldEf fectFlag : 0; 180 flags |= this->viewMatrix().isSimilarity() ? kSimilarity_DistanceFieldEf fectFlag : 0;
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 GrDistanceFieldNoGammaTextureEffect::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 false));
193 193
194 this->initDraw(batchTarget, dfProcessor, pipeline); 194 this->initDraw(batchTarget, dfProcessor, pipeline);
195 195
196 // allocate vertices 196 // allocate vertices
197 size_t vertexStride = dfProcessor->getVertexStride(); 197 size_t vertexStride = dfProcessor->getVertexStride();
198 SkASSERT(vertexStride == 2 * sizeof(SkPoint)); 198 SkASSERT(vertexStride == 2 * sizeof(SkPoint));
199 199
200 int vertexCount = GrBatchTarget::kVertsPerRect * instanceCount; 200 int vertexCount = GrBatchTarget::kVertsPerRect * instanceCount;
201 201
202 const GrVertexBuffer* vertexBuffer; 202 const GrVertexBuffer* vertexBuffer;
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color , viewMatrix, 607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color , viewMatrix,
608 fAtlas, &fPathC ache, &fPathList)); 608 fAtlas, &fPathC ache, &fPathList));
609 609
610 SkRect bounds = path.getBounds(); 610 SkRect bounds = path.getBounds();
611 viewMatrix.mapRect(&bounds); 611 viewMatrix.mapRect(&bounds);
612 target->drawBatch(pipelineBuilder, batch, &bounds); 612 target->drawBatch(pipelineBuilder, batch, &bounds);
613 613
614 return true; 614 return true;
615 } 615 }
616 616
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698