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

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

Issue 817853002: Remove localcoordchange functions off paint (Closed) Base URL: https://skia.googlesource.com/skia.git@local-matrix-on-gp
Patch Set: changing ignores Created 6 years 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/effects/SkDisplacementMapEffect.cpp ('k') | src/gpu/GrBitmapTextContext.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 2012 Google Inc. 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 "clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0 );}"); 568 "clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0 );}");
569 569
570 fsBuilder->codeAppendf("%s = vec4(edgeAlpha);", args.fOutputCoverage ); 570 fsBuilder->codeAppendf("%s = vec4(edgeAlpha);", args.fOutputCoverage );
571 } 571 }
572 572
573 static inline void GenKey(const GrGeometryProcessor& gp, 573 static inline void GenKey(const GrGeometryProcessor& gp,
574 const GrBatchTracker& bt, 574 const GrBatchTracker& bt,
575 const GrGLCaps&, 575 const GrGLCaps&,
576 GrProcessorKeyBuilder* b) { 576 GrProcessorKeyBuilder* b) {
577 const BatchTracker& local = bt.cast<BatchTracker>(); 577 const BatchTracker& local = bt.cast<BatchTracker>();
578 b->add32(local.fInputColorType); 578 b->add32((local.fInputColorType << 16) |
579 (local.fUsesLocalCoords && gp.localMatrix().hasPerspective( ) ? 0x1 : 0x0));
579 } 580 }
580 581
581 virtual void setData(const GrGLProgramDataManager& pdman, 582 virtual void setData(const GrGLProgramDataManager& pdman,
582 const GrPrimitiveProcessor& gp, 583 const GrPrimitiveProcessor& gp,
583 const GrBatchTracker& bt) SK_OVERRIDE { 584 const GrBatchTracker& bt) SK_OVERRIDE {
584 const BatchTracker& local = bt.cast<BatchTracker>(); 585 const BatchTracker& local = bt.cast<BatchTracker>();
585 if (kUniform_GrGPInput == local.fInputColorType && local.fColor != f Color) { 586 if (kUniform_GrGPInput == local.fInputColorType && local.fColor != f Color) {
586 GrGLfloat c[4]; 587 GrGLfloat c[4];
587 GrColorToRGBAFloat(local.fColor, c); 588 GrColorToRGBAFloat(local.fColor, c);
588 pdman.set4fv(fColorUniform, 1, c); 589 pdman.set4fv(fColorUniform, 1, c);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 vOffset, // start vertex 759 vOffset, // start vertex
759 0, // start index 760 0, // start index
760 draw.fVertexCnt, 761 draw.fVertexCnt,
761 draw.fIndexCnt, 762 draw.fIndexCnt,
762 &devBounds); 763 &devBounds);
763 vOffset += draw.fVertexCnt; 764 vOffset += draw.fVertexCnt;
764 } 765 }
765 766
766 return true; 767 return true;
767 } 768 }
OLDNEW
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/gpu/GrBitmapTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698