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

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

Issue 822423004: Move most of the transform logic into the primitive processors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 11 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 static UniformHandle CreateFromUniformIndex(int i); 47 static UniformHandle CreateFromUniformIndex(int i);
48 UniformHandle() { } 48 UniformHandle() { }
49 bool operator==(const UniformHandle& other) const { return other.fValue == fValue; } 49 bool operator==(const UniformHandle& other) const { return other.fValue == fValue; }
50 private: 50 private:
51 UniformHandle(int value) : ShaderResourceHandle(value) { } 51 UniformHandle(int value) : ShaderResourceHandle(value) { }
52 int toProgramDataIndex() const { SkASSERT(isValid()); return fValue; } 52 int toProgramDataIndex() const { SkASSERT(isValid()); return fValue; }
53 int toShaderBuilderIndex() const { return toProgramDataIndex(); } 53 int toShaderBuilderIndex() const { return toProgramDataIndex(); }
54 54
55 friend class GrGLProgramDataManager; // For accessing toProgramDataIndex (). 55 friend class GrGLProgramDataManager; // For accessing toProgramDataIndex ().
56 friend class GrGLProgramBuilder; // For accessing toShaderBuilderIndex() . 56 friend class GrGLProgramBuilder; // For accessing toShaderBuilderIndex() .
57 friend class GrGLGeometryProcessor;
57 }; 58 };
58 59
59 struct UniformInfo { 60 struct UniformInfo {
60 GrGLShaderVar fVariable; 61 GrGLShaderVar fVariable;
61 uint32_t fVisibility; 62 uint32_t fVisibility;
62 GrGLint fLocation; 63 GrGLint fLocation;
63 }; 64 };
64 65
65 // This uses an allocator rather than array so that the GrGLShaderVars don't move in memory 66 // This uses an allocator rather than array so that the GrGLShaderVars don't move in memory
66 // after they are inserted. Users of GrGLShaderBuilder get refs to the vars and ptrs to their 67 // after they are inserted. Users of GrGLShaderBuilder get refs to the vars and ptrs to their
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 int fArrayCount; 105 int fArrayCount;
105 ); 106 );
106 }; 107 };
107 108
108 SkTArray<Uniform, true> fUniforms; 109 SkTArray<Uniform, true> fUniforms;
109 GrGLGpu* fGpu; 110 GrGLGpu* fGpu;
110 111
111 typedef SkRefCnt INHERITED; 112 typedef SkRefCnt INHERITED;
112 }; 113 };
113 #endif 114 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698