OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 #include "ui/gfx/gl/gl_bindings_skia_in_process.h" | 6 #include "ui/gfx/gl/gl_bindings_skia_in_process.h" |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/gfx/gl/gl_bindings.h" | 9 #include "ui/gfx/gl/gl_bindings.h" |
10 #include "ui/gfx/gl/gl_implementation.h" | 10 #include "ui/gfx/gl/gl_implementation.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 GLvoid StubGLDisableVertexAttribArray(GLuint index) { | 159 GLvoid StubGLDisableVertexAttribArray(GLuint index) { |
160 glDisableVertexAttribArray(index); | 160 glDisableVertexAttribArray(index); |
161 } | 161 } |
162 | 162 |
163 GLvoid StubGLDrawArrays(GLenum mode, GLint first, GLsizei count) { | 163 GLvoid StubGLDrawArrays(GLenum mode, GLint first, GLsizei count) { |
164 glDrawArrays(mode, first, count); | 164 glDrawArrays(mode, first, count); |
165 } | 165 } |
166 | 166 |
| 167 GLvoid StubGLDrawBuffer(GLenum mode) { |
| 168 glDrawBuffer(mode); |
| 169 } |
| 170 |
| 171 GLvoid StubGLDrawBuffers(GLsizei n, const GLenum* bufs) { |
| 172 glDrawBuffersARB(n, bufs); |
| 173 } |
| 174 |
167 GLvoid StubGLDrawElements(GLenum mode, GLsizei count, GLenum type, | 175 GLvoid StubGLDrawElements(GLenum mode, GLsizei count, GLenum type, |
168 const void* indices) { | 176 const void* indices) { |
169 glDrawElements(mode, count, type, indices); | 177 glDrawElements(mode, count, type, indices); |
170 } | 178 } |
171 | 179 |
172 GLvoid StubGLEnable(GLenum cap) { | 180 GLvoid StubGLEnable(GLenum cap) { |
173 glEnable(cap); | 181 glEnable(cap); |
174 } | 182 } |
175 | 183 |
176 GLvoid StubGLEnableVertexAttribArray(GLuint index) { | 184 GLvoid StubGLEnableVertexAttribArray(GLuint index) { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 } | 281 } |
274 | 282 |
275 void* StubGLMapBuffer(GLenum target, GLenum access) { | 283 void* StubGLMapBuffer(GLenum target, GLenum access) { |
276 return glMapBuffer(target, access); | 284 return glMapBuffer(target, access); |
277 } | 285 } |
278 | 286 |
279 GLvoid StubGLPixelStorei(GLenum pname, GLint param) { | 287 GLvoid StubGLPixelStorei(GLenum pname, GLint param) { |
280 glPixelStorei(pname, param); | 288 glPixelStorei(pname, param); |
281 } | 289 } |
282 | 290 |
| 291 GLvoid StubGLReadBuffer(GLenum src) { |
| 292 glReadBuffer(src); |
| 293 } |
| 294 |
283 GLvoid StubGLReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, | 295 GLvoid StubGLReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, |
284 GLenum format, GLenum type, void* pixels) { | 296 GLenum format, GLenum type, void* pixels) { |
285 glReadPixels(x, y, width, height, format, type, pixels); | 297 glReadPixels(x, y, width, height, format, type, pixels); |
286 } | 298 } |
287 | 299 |
288 GLvoid StubGLRenderBufferStorage(GLenum target, GLenum internalformat, | 300 GLvoid StubGLRenderBufferStorage(GLenum target, GLenum internalformat, |
289 GLsizei width, GLsizei height) { | 301 GLsizei width, GLsizei height) { |
290 glRenderbufferStorageEXT(target, internalformat, width, height); | 302 glRenderbufferStorageEXT(target, internalformat, width, height); |
291 } | 303 } |
292 | 304 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 StubGLCullFace, | 524 StubGLCullFace, |
513 StubGLDeleteBuffers, | 525 StubGLDeleteBuffers, |
514 StubGLDeleteProgram, | 526 StubGLDeleteProgram, |
515 StubGLDeleteShader, | 527 StubGLDeleteShader, |
516 StubGLDeleteTextures, | 528 StubGLDeleteTextures, |
517 StubGLDepthMask, | 529 StubGLDepthMask, |
518 StubGLDisable, | 530 StubGLDisable, |
519 NULL, // glDisableClientState | 531 NULL, // glDisableClientState |
520 StubGLDisableVertexAttribArray, | 532 StubGLDisableVertexAttribArray, |
521 StubGLDrawArrays, | 533 StubGLDrawArrays, |
| 534 StubGLDrawBuffer, |
| 535 StubGLDrawBuffers, |
522 StubGLDrawElements, | 536 StubGLDrawElements, |
523 StubGLEnable, | 537 StubGLEnable, |
524 NULL, // glEnableClientState | 538 NULL, // glEnableClientState |
525 StubGLEnableVertexAttribArray, | 539 StubGLEnableVertexAttribArray, |
526 StubGLFrontFace, | 540 StubGLFrontFace, |
527 StubGLGenBuffers, | 541 StubGLGenBuffers, |
528 StubGLGenTextures, | 542 StubGLGenTextures, |
529 StubGLGetBufferParameteriv, | 543 StubGLGetBufferParameteriv, |
530 StubGLGetError, | 544 StubGLGetError, |
531 StubGLGetIntegerv, | 545 StubGLGetIntegerv, |
532 StubGLGetProgramInfoLog, | 546 StubGLGetProgramInfoLog, |
533 StubGLGetProgramiv, | 547 StubGLGetProgramiv, |
534 StubGLGetShaderInfoLog, | 548 StubGLGetShaderInfoLog, |
535 StubGLGetShaderiv, | 549 StubGLGetShaderiv, |
536 StubGLGetString, | 550 StubGLGetString, |
537 StubGLGetTexLevelParameteriv, | 551 StubGLGetTexLevelParameteriv, |
538 StubGLGetUniformLocation, | 552 StubGLGetUniformLocation, |
539 StubGLLineWidth, | 553 StubGLLineWidth, |
540 StubGLLinkProgram, | 554 StubGLLinkProgram, |
541 NULL, // glLoadMatrixf | 555 NULL, // glLoadMatrixf |
542 NULL, // glMatrixMode | 556 NULL, // glMatrixMode |
543 StubGLPixelStorei, | 557 StubGLPixelStorei, |
544 NULL, // glPointSize | 558 NULL, // glPointSize |
| 559 StubGLReadBuffer, |
545 StubGLReadPixels, | 560 StubGLReadPixels, |
546 StubGLScissor, | 561 StubGLScissor, |
547 NULL, // glShadeModel | 562 NULL, // glShadeModel |
548 StubGLShaderSource, | 563 StubGLShaderSource, |
549 StubGLStencilFunc, | 564 StubGLStencilFunc, |
550 StubGLStencilFuncSeparate, | 565 StubGLStencilFuncSeparate, |
551 StubGLStencilMask, | 566 StubGLStencilMask, |
552 StubGLStencilMaskSeparate, | 567 StubGLStencilMaskSeparate, |
553 StubGLStencilOp, | 568 StubGLStencilOp, |
554 StubGLStencilOpSeparate, | 569 StubGLStencilOpSeparate, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 StubBindFragDataLocationIndexedARB, | 616 StubBindFragDataLocationIndexedARB, |
602 GrGLInterface::kStaticInitEndGuard, | 617 GrGLInterface::kStaticInitEndGuard, |
603 }; | 618 }; |
604 GrGLSetGLInterface(&host_gl_interface); | 619 GrGLSetGLInterface(&host_gl_interface); |
605 host_StubGL_installed = true; | 620 host_StubGL_installed = true; |
606 } | 621 } |
607 } | 622 } |
608 | 623 |
609 } // namespace gfx | 624 } // namespace gfx |
610 | 625 |
OLD | NEW |