OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |