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

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

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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
« no previous file with comments | « src/gpu/gl/GrGLTexture.cpp ('k') | src/gpu/gl/GrGLUniformManager.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 GrGLUniformManager_DEFINED 8 #ifndef GrGLUniformManager_DEFINED
9 #define GrGLUniformManager_DEFINED 9 #define GrGLUniformManager_DEFINED
10 10
(...skipping 19 matching lines...) Expand all
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
33 UniformHandle() 33 UniformHandle()
34 : fValue(0) { 34 : fValue(0) {
35 } 35 }
36 36
37 private: 37 private:
38 UniformHandle(int value) 38 UniformHandle(int value)
39 : fValue(~value) { 39 : fValue(~value) {
40 GrAssert(isValid()); 40 SkASSERT(isValid());
41 } 41 }
42 42
43 int toUniformIndex() const { GrAssert(isValid()); return ~fValue; } 43 int toUniformIndex() const { SkASSERT(isValid()); return ~fValue; }
44 44
45 int fValue; 45 int fValue;
46 friend class GrGLUniformManager; // For accessing toUniformIndex(). 46 friend class GrGLUniformManager; // For accessing toUniformIndex().
47 }; 47 };
48 48
49 GrGLUniformManager(const GrGLContext& context) : fContext(context) {} 49 GrGLUniformManager(const GrGLContext& context) : fContext(context) {}
50 50
51 UniformHandle appendUniform(GrSLType type, int arrayCount = GrGLShaderVar::k NonArray); 51 UniformHandle appendUniform(GrSLType type, int arrayCount = GrGLShaderVar::k NonArray);
52 52
53 /** Functions for uploading uniform values. The varities ending in v can be used to upload to an 53 /** Functions for uploading uniform values. The varities ending in v can be used to upload to an
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 GrGLint fFSLocation; 101 GrGLint fFSLocation;
102 GrSLType fType; 102 GrSLType fType;
103 int fArrayCount; 103 int fArrayCount;
104 }; 104 };
105 105
106 SkTArray<Uniform, true> fUniforms; 106 SkTArray<Uniform, true> fUniforms;
107 const GrGLContext& fContext; 107 const GrGLContext& fContext;
108 }; 108 };
109 109
110 #endif 110 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLTexture.cpp ('k') | src/gpu/gl/GrGLUniformManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698