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

Side by Side Diff: src/gpu/gl/GrGLPrimitiveProcessor.h

Issue 1132323003: Revert of Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: 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/effects/GrDistanceFieldGeoProc.cpp ('k') | src/gpu/gl/GrGLPrimitiveProcessor.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGLPrimitiveProcessor_DEFINED 8 #ifndef GrGLPrimitiveProcessor_DEFINED
9 #define GrGLPrimitiveProcessor_DEFINED 9 #define GrGLPrimitiveProcessor_DEFINED
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 GrPrimitiveProcessor parameter is guaranteed to be of the same type that created this 67 GrPrimitiveProcessor parameter is guaranteed to be of the same type that created this
68 GrGLPrimitiveProcessor and to have an identical processor key as the one that created this 68 GrGLPrimitiveProcessor and to have an identical processor key as the one that created this
69 GrGLPrimitiveProcessor. */ 69 GrGLPrimitiveProcessor. */
70 virtual void setData(const GrGLProgramDataManager&, 70 virtual void setData(const GrGLProgramDataManager&,
71 const GrPrimitiveProcessor&, 71 const GrPrimitiveProcessor&,
72 const GrBatchTracker&) = 0; 72 const GrBatchTracker&) = 0;
73 73
74 static SkMatrix GetTransformMatrix(const SkMatrix& localMatrix, const GrCoor dTransform&); 74 static SkMatrix GetTransformMatrix(const SkMatrix& localMatrix, const GrCoor dTransform&);
75 75
76 protected: 76 protected:
77 void setupUniformColor(GrGLGPBuilder* pb, const char* outputName, UniformHan dle* colorUniform); 77 /** a helper which can setup vertex, constant, or uniform color depending on inputType.
78 * This function will only do the minimum required to emit the correct shad er code. If
79 * inputType == attribute, then colorAttr must not be NULL. Likewise, if i nputType == Uniform
80 * then colorUniform must not be NULL.
81 */
82 void setupColorPassThrough(GrGLGPBuilder* pb,
83 GrGPInput inputType,
84 const char* inputName,
85 const GrPrimitiveProcessor::Attribute* colorAttr,
86 UniformHandle* colorUniform);
78 87
79 const char* uViewM() const { return fViewMatrixName; } 88 const char* uViewM() const { return fViewMatrixName; }
80 89
81 /** a helper function to setup the uniform handle for the uniform view matri x */ 90 /** a helper function to setup the uniform handle for the uniform view matri x */
82 void addUniformViewMatrix(GrGLGPBuilder*); 91 void addUniformViewMatrix(GrGLGPBuilder*);
83 92
84 93
85 /** a helper function to upload a uniform viewmatrix. 94 /** a helper function to upload a uniform viewmatrix.
86 * TODO we can remove this function when we have deferred geometry in place 95 * TODO we can remove this function when we have deferred geometry in place
87 */ 96 */
(...skipping 24 matching lines...) Expand all
112 121
113 SkSTArray<8, SkSTArray<2, Transform, true> > fInstalledTransforms; 122 SkSTArray<8, SkSTArray<2, Transform, true> > fInstalledTransforms;
114 123
115 private: 124 private:
116 UniformHandle fViewMatrixUniform; 125 UniformHandle fViewMatrixUniform;
117 SkMatrix fViewMatrix; 126 SkMatrix fViewMatrix;
118 const char* fViewMatrixName; 127 const char* fViewMatrixName;
119 }; 128 };
120 129
121 #endif 130 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.cpp ('k') | src/gpu/gl/GrGLPrimitiveProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698