OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "GrGLNoOpInterface.h" | 8 #include "GrGLNoOpInterface.h" |
9 #include "SkString.h" | 9 #include "SkString.h" |
10 #include "SkThread.h" | 10 #include "SkThread.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode) { | 113 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode) { |
114 } | 114 } |
115 | 115 |
116 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag) { | 116 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag) { |
117 } | 117 } |
118 | 118 |
119 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap) { | 119 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap) { |
120 } | 120 } |
121 | 121 |
| 122 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableClientState(GrGLenum) { |
| 123 } |
| 124 |
122 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index) { | 125 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index) { |
123 } | 126 } |
124 | 127 |
125 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, | 128 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, |
126 GrGLint first, | 129 GrGLint first, |
127 GrGLsizei count) { | 130 GrGLsizei count) { |
128 } | 131 } |
129 | 132 |
130 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode) { | 133 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode) { |
131 } | 134 } |
132 | 135 |
133 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n, | 136 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n, |
134 const GrGLenum* bufs) { | 137 const GrGLenum* bufs) { |
135 } | 138 } |
136 | 139 |
137 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, | 140 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, |
138 GrGLsizei count, | 141 GrGLsizei count, |
139 GrGLenum type, | 142 GrGLenum type, |
140 const GrGLvoid* indices) { | 143 const GrGLvoid* indices) { |
141 } | 144 } |
142 | 145 |
143 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap) { | 146 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap) { |
144 } | 147 } |
145 | 148 |
| 149 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableClientState(GrGLenum cap) { |
| 150 } |
| 151 |
146 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index) { | 152 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index) { |
147 } | 153 } |
148 | 154 |
149 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target) { | 155 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target) { |
150 } | 156 } |
151 | 157 |
152 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish() { | 158 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish() { |
153 } | 159 } |
154 | 160 |
155 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush() { | 161 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush() { |
156 } | 162 } |
157 | 163 |
158 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode) { | 164 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode) { |
159 } | 165 } |
160 | 166 |
161 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width) { | 167 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width) { |
162 } | 168 } |
163 | 169 |
164 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program) { | 170 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program) { |
165 } | 171 } |
166 | 172 |
| 173 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadIdentity() { |
| 174 } |
| 175 |
| 176 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadMatrixf(const GrGLfloat*) { |
| 177 } |
| 178 |
| 179 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixMode(GrGLenum) { |
| 180 } |
| 181 |
167 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id, GrGLenum target) { | 182 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id, GrGLenum target) { |
168 } | 183 } |
169 | 184 |
170 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src) { | 185 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src) { |
171 } | 186 } |
172 | 187 |
173 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x, | 188 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x, |
174 GrGLint y, | 189 GrGLint y, |
175 GrGLsizei width, | 190 GrGLsizei width, |
176 GrGLsizei height) { | 191 GrGLsizei height) { |
(...skipping 26 matching lines...) Expand all Loading... |
203 | 218 |
204 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGL
enum zpass) { | 219 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGL
enum zpass) { |
205 } | 220 } |
206 | 221 |
207 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face, | 222 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face, |
208 GrGLenum fail, | 223 GrGLenum fail, |
209 GrGLenum zfail, | 224 GrGLenum zfail, |
210 GrGLenum zpass) { | 225 GrGLenum zpass) { |
211 } | 226 } |
212 | 227 |
| 228 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGenf(GrGLenum, GrGLenum, float) { |
| 229 } |
| 230 |
| 231 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGenfv(GrGLenum, GrGLenum, const float*) { |
| 232 } |
| 233 |
| 234 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGeni(GrGLenum, GrGLenum, GrGLint) { |
| 235 } |
| 236 |
213 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target, | 237 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target, |
214 GrGLint level, | 238 GrGLint level, |
215 GrGLint internalformat, | 239 GrGLint internalformat, |
216 GrGLsizei width, | 240 GrGLsizei width, |
217 GrGLsizei height, | 241 GrGLsizei height, |
218 GrGLint border, | 242 GrGLint border, |
219 GrGLenum format, | 243 GrGLenum format, |
220 GrGLenum type, | 244 GrGLenum type, |
221 const GrGLvoid* pixels) { | 245 const GrGLvoid* pixels) { |
222 } | 246 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 378 } |
355 | 379 |
356 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, | 380 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, |
357 GrGLint size, | 381 GrGLint size, |
358 GrGLenum type, | 382 GrGLenum type, |
359 GrGLboolean normalized, | 383 GrGLboolean normalized, |
360 GrGLsizei stride, | 384 GrGLsizei stride, |
361 const GrGLvoid* ptr) { | 385 const GrGLvoid* ptr) { |
362 } | 386 } |
363 | 387 |
| 388 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexPointer(GrGLint, GrGLenum, GrGLsizei, c
onst GrGLvoid*) { |
| 389 } |
| 390 |
364 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, | 391 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, |
365 GrGLint y, | 392 GrGLint y, |
366 GrGLsizei width, | 393 GrGLsizei width, |
367 GrGLsizei height) { | 394 GrGLsizei height) { |
368 } | 395 } |
369 | 396 |
370 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenu
m target, | 397 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenu
m target, |
371 GrGLenu
m attachment, | 398 GrGLenu
m attachment, |
372 GrGLenu
m pname, | 399 GrGLenu
m pname, |
373 GrGLint
* params) { | 400 GrGLint
* params) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 break; | 478 break; |
452 case GR_GL_VIEWPORT: | 479 case GR_GL_VIEWPORT: |
453 params[0] = 0; | 480 params[0] = 0; |
454 params[1] = 0; | 481 params[1] = 0; |
455 params[2] = 800; | 482 params[2] = 800; |
456 params[3] = 600; | 483 params[3] = 600; |
457 break; | 484 break; |
458 case GR_GL_MAX_TEXTURE_IMAGE_UNITS: | 485 case GR_GL_MAX_TEXTURE_IMAGE_UNITS: |
459 *params = 8; | 486 *params = 8; |
460 break; | 487 break; |
| 488 case GR_GL_MAX_TEXTURE_COORDS: |
| 489 *params = 8; |
| 490 break; |
461 case GR_GL_MAX_VERTEX_UNIFORM_VECTORS: | 491 case GR_GL_MAX_VERTEX_UNIFORM_VECTORS: |
462 *params = kDefaultMaxVertexUniformVectors; | 492 *params = kDefaultMaxVertexUniformVectors; |
463 break; | 493 break; |
464 case GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS: | 494 case GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS: |
465 *params = kDefaultMaxFragmentUniformVectors; | 495 *params = kDefaultMaxFragmentUniformVectors; |
466 break; | 496 break; |
467 case GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS: | 497 case GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS: |
468 *params = 16 * 4; | 498 *params = 16 * 4; |
469 break; | 499 break; |
470 case GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS: | 500 case GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS: |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 GrGLint* params) { | 649 GrGLint* params) { |
620 // we used to use this to query stuff about externally created textures, | 650 // we used to use this to query stuff about externally created textures, |
621 // now we just require clients to tell us everything about the texture. | 651 // now we just require clients to tell us everything about the texture. |
622 GrCrash("Should never query texture parameters."); | 652 GrCrash("Should never query texture parameters."); |
623 } | 653 } |
624 | 654 |
625 GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const cha
r* name) { | 655 GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const cha
r* name) { |
626 static int gUniLocation = 0; | 656 static int gUniLocation = 0; |
627 return ++gUniLocation; | 657 return ++gUniLocation; |
628 } | 658 } |
OLD | NEW |