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

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

Issue 956363003: Cleanup in GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 10 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/GrClipMaskManager.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 /* 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return true; 309 return true;
310 } 310 }
311 311
312 bool GrAADistanceFieldPathRenderer::internalDrawPath(GrDrawTarget* target, 312 bool GrAADistanceFieldPathRenderer::internalDrawPath(GrDrawTarget* target,
313 GrPipelineBuilder* pipeline Builder, 313 GrPipelineBuilder* pipeline Builder,
314 GrColor color, 314 GrColor color,
315 const SkMatrix& viewMatrix, 315 const SkMatrix& viewMatrix,
316 const SkPath& path, 316 const SkPath& path,
317 const PathData* pathData) { 317 const PathData* pathData) {
318 GrTexture* texture = fAtlas->getTexture(); 318 GrTexture* texture = fAtlas->getTexture();
319 GrPipelineBuilder::AutoRestoreEffects are(pipelineBuilder); 319 GrPipelineBuilder::AutoRestoreFragmentProcessors arfp(pipelineBuilder);
320 320
321 SkASSERT(pathData->fPlot); 321 SkASSERT(pathData->fPlot);
322 GrDrawTarget::DrawToken drawToken = target->getCurrentDrawToken(); 322 GrDrawTarget::DrawToken drawToken = target->getCurrentDrawToken();
323 pathData->fPlot->setDrawToken(drawToken); 323 pathData->fPlot->setDrawToken(drawToken);
324 324
325 // set up any flags 325 // set up any flags
326 uint32_t flags = 0; 326 uint32_t flags = 0;
327 flags |= viewMatrix.isSimilarity() ? kSimilarity_DistanceFieldEffectFlag : 0 ; 327 flags |= viewMatrix.isSimilarity() ? kSimilarity_DistanceFieldEffectFlag : 0 ;
328 328
329 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBilerp_ FilterMode); 329 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBilerp_ FilterMode);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 viewMatrix.mapRect(&r); 379 viewMatrix.mapRect(&r);
380 target->setIndexSourceToBuffer(fContext->getQuadIndexBuffer()); 380 target->setIndexSourceToBuffer(fContext->getQuadIndexBuffer());
381 target->drawIndexedInstances(pipelineBuilder, fCachedGeometryProcessor.get() , 381 target->drawIndexedInstances(pipelineBuilder, fCachedGeometryProcessor.get() ,
382 kTriangles_GrPrimitiveType, 1, 4, 6, &r); 382 kTriangles_GrPrimitiveType, 1, 4, 6, &r);
383 target->resetVertexSource(); 383 target->resetVertexSource();
384 384
385 return true; 385 return true;
386 } 386 }
387 387
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698