| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
| 9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
| 10 #include "GrGLDefines.h" | 10 #include "GrGLDefines.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 GrGLvoid GR_GL_FUNCTION_TYPE nullGLBindVertexArray(GrGLuint id) {} | 102 GrGLvoid GR_GL_FUNCTION_TYPE nullGLBindVertexArray(GrGLuint id) {} |
| 103 | 103 |
| 104 GrGLvoid GR_GL_FUNCTION_TYPE nullGLGenBuffers(GrGLsizei n, GrGLuint* ids) { | 104 GrGLvoid GR_GL_FUNCTION_TYPE nullGLGenBuffers(GrGLsizei n, GrGLuint* ids) { |
| 105 | 105 |
| 106 for (int i = 0; i < n; ++i) { | 106 for (int i = 0; i < n; ++i) { |
| 107 GrBufferObj* buffer = create_buffer(); | 107 GrBufferObj* buffer = create_buffer(); |
| 108 ids[i] = buffer->id(); | 108 ids[i] = buffer->id(); |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 GrGLvoid GR_GL_FUNCTION_TYPE nullGLGenerateMipmap(GrGLenum target) {} |
| 113 |
| 112 GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferData(GrGLenum target, | 114 GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferData(GrGLenum target, |
| 113 GrGLsizeiptr size, | 115 GrGLsizeiptr size, |
| 114 const GrGLvoid* data, | 116 const GrGLvoid* data, |
| 115 GrGLenum usage) { | 117 GrGLenum usage) { |
| 116 GrGLuint id = 0; | 118 GrGLuint id = 0; |
| 117 | 119 |
| 118 switch (target) { | 120 switch (target) { |
| 119 case GR_GL_ARRAY_BUFFER: | 121 case GR_GL_ARRAY_BUFFER: |
| 120 id = gCurrArrayBuffer; | 122 id = gCurrArrayBuffer; |
| 121 break; | 123 break; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 interface->fDrawBuffer = noOpGLDrawBuffer; | 301 interface->fDrawBuffer = noOpGLDrawBuffer; |
| 300 interface->fDrawBuffers = noOpGLDrawBuffers; | 302 interface->fDrawBuffers = noOpGLDrawBuffers; |
| 301 interface->fDrawElements = noOpGLDrawElements; | 303 interface->fDrawElements = noOpGLDrawElements; |
| 302 interface->fEnable = noOpGLEnable; | 304 interface->fEnable = noOpGLEnable; |
| 303 interface->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; | 305 interface->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; |
| 304 interface->fEndQuery = noOpGLEndQuery; | 306 interface->fEndQuery = noOpGLEndQuery; |
| 305 interface->fFinish = noOpGLFinish; | 307 interface->fFinish = noOpGLFinish; |
| 306 interface->fFlush = noOpGLFlush; | 308 interface->fFlush = noOpGLFlush; |
| 307 interface->fFrontFace = noOpGLFrontFace; | 309 interface->fFrontFace = noOpGLFrontFace; |
| 308 interface->fGenBuffers = nullGLGenBuffers; | 310 interface->fGenBuffers = nullGLGenBuffers; |
| 311 interface->fGenerateMipmap = nullGLGenerateMipmap; |
| 309 interface->fGenQueries = noOpGLGenIds; | 312 interface->fGenQueries = noOpGLGenIds; |
| 310 interface->fGenTextures = noOpGLGenIds; | 313 interface->fGenTextures = noOpGLGenIds; |
| 311 interface->fGenVertexArrays = noOpGLGenIds; | 314 interface->fGenVertexArrays = noOpGLGenIds; |
| 312 interface->fGetBufferParameteriv = nullGLGetBufferParameteriv; | 315 interface->fGetBufferParameteriv = nullGLGetBufferParameteriv; |
| 313 interface->fGetError = noOpGLGetError; | 316 interface->fGetError = noOpGLGetError; |
| 314 interface->fGetIntegerv = noOpGLGetIntegerv; | 317 interface->fGetIntegerv = noOpGLGetIntegerv; |
| 315 interface->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v; | 318 interface->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v; |
| 316 interface->fGetQueryObjectiv = noOpGLGetQueryObjectiv; | 319 interface->fGetQueryObjectiv = noOpGLGetQueryObjectiv; |
| 317 interface->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v; | 320 interface->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v; |
| 318 interface->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv; | 321 interface->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 interface->fRenderbufferStorageMultisample = noOpGLRenderbufferStorageMu
ltisample; | 386 interface->fRenderbufferStorageMultisample = noOpGLRenderbufferStorageMu
ltisample; |
| 384 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; | 387 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; |
| 385 interface->fResolveMultisampleFramebuffer = noOpGLResolveMultisampleFram
ebuffer; | 388 interface->fResolveMultisampleFramebuffer = noOpGLResolveMultisampleFram
ebuffer; |
| 386 interface->fMapBuffer = nullGLMapBuffer; | 389 interface->fMapBuffer = nullGLMapBuffer; |
| 387 interface->fUnmapBuffer = nullGLUnmapBuffer; | 390 interface->fUnmapBuffer = nullGLUnmapBuffer; |
| 388 interface->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationInde
xed; | 391 interface->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationInde
xed; |
| 389 } | 392 } |
| 390 glInterface.get()->ref(); | 393 glInterface.get()->ref(); |
| 391 return glInterface.get(); | 394 return glInterface.get(); |
| 392 } | 395 } |
| OLD | NEW |