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

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

Issue 1755483002: Add support for 2x2 matrices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: vk updates Created 4 years, 9 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 | « include/gpu/GrTypesPriv.h ('k') | src/gpu/gl/GrGLProgramDataManager.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 2012 Google Inc. 2 * Copyright 2012 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 GrGLProgramDataManager_DEFINED 8 #ifndef GrGLProgramDataManager_DEFINED
9 #define GrGLProgramDataManager_DEFINED 9 #define GrGLProgramDataManager_DEFINED
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void set1f(UniformHandle, float v0) const override; 54 void set1f(UniformHandle, float v0) const override;
55 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; 55 void set1fv(UniformHandle, int arrayCount, const float v[]) const override;
56 void set2f(UniformHandle, float, float) const override; 56 void set2f(UniformHandle, float, float) const override;
57 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; 57 void set2fv(UniformHandle, int arrayCount, const float v[]) const override;
58 void set3f(UniformHandle, float, float, float) const override; 58 void set3f(UniformHandle, float, float, float) const override;
59 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; 59 void set3fv(UniformHandle, int arrayCount, const float v[]) const override;
60 void set4f(UniformHandle, float, float, float, float) const override; 60 void set4f(UniformHandle, float, float, float, float) const override;
61 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; 61 void set4fv(UniformHandle, int arrayCount, const float v[]) const override;
62 // matrices are column-major, the first three upload a single matrix, the la tter three upload 62 // matrices are column-major, the first three upload a single matrix, the la tter three upload
63 // arrayCount matrices into a uniform array. 63 // arrayCount matrices into a uniform array.
64 void setMatrix2f(UniformHandle, const float matrix[]) const override;
64 void setMatrix3f(UniformHandle, const float matrix[]) const override; 65 void setMatrix3f(UniformHandle, const float matrix[]) const override;
65 void setMatrix4f(UniformHandle, const float matrix[]) const override; 66 void setMatrix4f(UniformHandle, const float matrix[]) const override;
67 void setMatrix2fv(UniformHandle, int arrayCount, const float matrices[]) con st override;
66 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con st override; 68 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con st override;
67 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con st override; 69 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con st override;
68 70
69 // for nvpr only 71 // for nvpr only
70 void setPathFragmentInputTransform(VaryingHandle u, int components, 72 void setPathFragmentInputTransform(VaryingHandle u, int components,
71 const SkMatrix& matrix) const override; 73 const SkMatrix& matrix) const override;
72 74
73 private: 75 private:
74 enum { 76 enum {
75 kUnusedUniform = -1, 77 kUnusedUniform = -1,
(...skipping 14 matching lines...) Expand all
90 struct PathProcVarying { 92 struct PathProcVarying {
91 GrGLint fLocation; 93 GrGLint fLocation;
92 SkDEBUGCODE( 94 SkDEBUGCODE(
93 GrSLType fType; 95 GrSLType fType;
94 int fArrayCount; 96 int fArrayCount;
95 ); 97 );
96 }; 98 };
97 99
98 SkDEBUGCODE(void printUnused(const Uniform&) const;) 100 SkDEBUGCODE(void printUnused(const Uniform&) const;)
99 101
102 template<int N> inline void setMatrices(UniformHandle, int arrayCount,
103 const float matrices[]) const;
104
100 SkTArray<Uniform, true> fUniforms; 105 SkTArray<Uniform, true> fUniforms;
101 SkTArray<PathProcVarying, true> fPathProcVaryings; 106 SkTArray<PathProcVarying, true> fPathProcVaryings;
102 GrGLGpu* fGpu; 107 GrGLGpu* fGpu;
103 GrGLuint fProgramID; 108 GrGLuint fProgramID;
104 109
105 typedef GrGLSLProgramDataManager INHERITED; 110 typedef GrGLSLProgramDataManager INHERITED;
106 }; 111 };
107 112
108 #endif 113 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | src/gpu/gl/GrGLProgramDataManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698