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

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

Issue 778783002: Use texture size to determine precision of texture coord varyings (Closed) Base URL: https://skia.googlesource.com/skia.git@defaultp
Patch Set: include skrandom.h in new gm cpp Created 6 years 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/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('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 GrGLUtil_DEFINED 8 #ifndef GrGLUtil_DEFINED
9 #define GrGLUtil_DEFINED 9 #define GrGLUtil_DEFINED
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 do { \ 64 do { \
65 *(p) = GR_GL_INIT_ZERO; \ 65 *(p) = GR_GL_INIT_ZERO; \
66 GR_GL_CALL(gl, GetFramebufferAttachmentParameteriv(t, a, pname, p)); \ 66 GR_GL_CALL(gl, GetFramebufferAttachmentParameteriv(t, a, pname, p)); \
67 } while (0) 67 } while (0)
68 68
69 #define GR_GL_GetRenderbufferParameteriv(gl, t, pname, p) \ 69 #define GR_GL_GetRenderbufferParameteriv(gl, t, pname, p) \
70 do { \ 70 do { \
71 *(p) = GR_GL_INIT_ZERO; \ 71 *(p) = GR_GL_INIT_ZERO; \
72 GR_GL_CALL(gl, GetRenderbufferParameteriv(t, pname, p)); \ 72 GR_GL_CALL(gl, GetRenderbufferParameteriv(t, pname, p)); \
73 } while (0) 73 } while (0)
74
74 #define GR_GL_GetTexLevelParameteriv(gl, t, l, pname, p) \ 75 #define GR_GL_GetTexLevelParameteriv(gl, t, l, pname, p) \
75 do { \ 76 do { \
76 *(p) = GR_GL_INIT_ZERO; \ 77 *(p) = GR_GL_INIT_ZERO; \
77 GR_GL_CALL(gl, GetTexLevelParameteriv(t, l, pname, p)); \ 78 GR_GL_CALL(gl, GetTexLevelParameteriv(t, l, pname, p)); \
78 } while (0) 79 } while (0)
79 80
81 #define GR_GL_GetShaderPrecisionFormat(gl, st, pt, range, precision) \
82 do { \
83 (range)[0] = GR_GL_INIT_ZERO; \
84 (range)[1] = GR_GL_INIT_ZERO; \
85 (*precision) = GR_GL_INIT_ZERO; \
86 GR_GL_CALL(gl, GetShaderPrecisionFormat(st, pt, range, precision)); \
87 } while (0)
88
80 //////////////////////////////////////////////////////////////////////////////// 89 ////////////////////////////////////////////////////////////////////////////////
81 90
82 /** 91 /**
83 * Helpers for glGetString() 92 * Helpers for glGetString()
84 */ 93 */
85 94
86 // these variants assume caller already has a string from glGetString() 95 // these variants assume caller already has a string from glGetString()
87 GrGLVersion GrGLGetVersionFromString(const char* versionString); 96 GrGLVersion GrGLGetVersionFromString(const char* versionString);
88 GrGLStandard GrGLGetStandardInUseFromString(const char* versionString); 97 GrGLStandard GrGLGetStandardInUseFromString(const char* versionString);
89 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString); 98 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 GR_GL_LOG_CALLS_IMPL(X); \ 189 GR_GL_LOG_CALLS_IMPL(X); \
181 } while (false) 190 } while (false)
182 191
183 // call glGetError without doing a redundant error check or logging. 192 // call glGetError without doing a redundant error check or logging.
184 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fFunctions.fGetError() 193 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fFunctions.fGetError()
185 194
186 GrGLenum GrToGLStencilFunc(GrStencilFunc basicFunc); 195 GrGLenum GrToGLStencilFunc(GrStencilFunc basicFunc);
187 196
188 197
189 #endif 198 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698