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

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

Issue 302663006: Incremental refactoring of GrGLProgram and GrGLShaderBuilder (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more Created 6 years, 6 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 | Annotate | Revision Log
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 GrGLUniformManager_DEFINED 8 #ifndef GrGLUniformManager_DEFINED
9 #define GrGLUniformManager_DEFINED 9 #define GrGLUniformManager_DEFINED
10 10
11 #include "gl/GrGLShaderVar.h" 11 #include "gl/GrGLShaderVar.h"
12 #include "gl/GrGLSL.h" 12 #include "gl/GrGLSL.h"
13 #include "GrAllocator.h" 13 #include "GrAllocator.h"
14 14
15 #include "SkTArray.h" 15 #include "SkTArray.h"
16 16
17 class GrGpuGL; 17 class GrGpuGL;
18 class SkMatrix; 18 class SkMatrix;
19 19
20 /** Manages a program's uniforms. 20 /** Manages a program's uniforms.
21 */ 21 */
22 class GrGLUniformManager { 22 class GrGLUniformManager : public SkRefCnt {
23 public: 23 public:
24 // Opaque handle to a uniform 24 // Opaque handle to a uniform
25 class UniformHandle { 25 class UniformHandle {
26 public: 26 public:
27 static UniformHandle CreateFromUniformIndex(int i); 27 static UniformHandle CreateFromUniformIndex(int i);
28 28
29 bool isValid() const { return 0 != fValue; } 29 bool isValid() const { return 0 != fValue; }
30 30
31 bool operator==(const UniformHandle& other) const { return other.fValue == fValue; } 31 bool operator==(const UniformHandle& other) const { return other.fValue == fValue; }
32 32
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 struct Uniform { 106 struct Uniform {
107 GrGLint fVSLocation; 107 GrGLint fVSLocation;
108 GrGLint fFSLocation; 108 GrGLint fFSLocation;
109 GrSLType fType; 109 GrSLType fType;
110 int fArrayCount; 110 int fArrayCount;
111 }; 111 };
112 112
113 bool fUsingBindUniform; 113 bool fUsingBindUniform;
114 SkTArray<Uniform, true> fUniforms; 114 SkTArray<Uniform, true> fUniforms;
115 GrGpuGL* fGpu; 115 GrGpuGL* fGpu;
robertphillips 2014/05/29 12:24:57 INHERITED ?
bsalomon 2014/05/29 21:22:16 Done.
116 }; 116 };
117 117
118 #endif 118 #endif
OLDNEW
« src/gpu/gl/GrGLShaderBuilder.h ('K') | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698