OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "gl/SkNullGLContext.h" | 9 #include "gl/SkNullGLContext.h" |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 functions->fDeleteBuffers = nullGLDeleteBuffers; | 378 functions->fDeleteBuffers = nullGLDeleteBuffers; |
379 functions->fDeleteProgram = nullGLDelete; | 379 functions->fDeleteProgram = nullGLDelete; |
380 functions->fDeleteQueries = noOpGLDeleteIds; | 380 functions->fDeleteQueries = noOpGLDeleteIds; |
381 functions->fDeleteShader = nullGLDelete; | 381 functions->fDeleteShader = nullGLDelete; |
382 functions->fDeleteTextures = noOpGLDeleteIds; | 382 functions->fDeleteTextures = noOpGLDeleteIds; |
383 functions->fDeleteVertexArrays = noOpGLDeleteIds; | 383 functions->fDeleteVertexArrays = noOpGLDeleteIds; |
384 functions->fDepthMask = noOpGLDepthMask; | 384 functions->fDepthMask = noOpGLDepthMask; |
385 functions->fDisable = noOpGLDisable; | 385 functions->fDisable = noOpGLDisable; |
386 functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; | 386 functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; |
387 functions->fDrawArrays = noOpGLDrawArrays; | 387 functions->fDrawArrays = noOpGLDrawArrays; |
388 functions->fDrawArraysInstanced = noOpGLDrawArraysInstanced; | |
389 functions->fDrawBuffer = noOpGLDrawBuffer; | 388 functions->fDrawBuffer = noOpGLDrawBuffer; |
390 functions->fDrawBuffers = noOpGLDrawBuffers; | 389 functions->fDrawBuffers = noOpGLDrawBuffers; |
391 functions->fDrawElements = noOpGLDrawElements; | 390 functions->fDrawElements = noOpGLDrawElements; |
392 functions->fDrawElementsInstanced = noOpGLDrawElementsInstanced; | |
393 functions->fEnable = noOpGLEnable; | 391 functions->fEnable = noOpGLEnable; |
394 functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; | 392 functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; |
395 functions->fEndQuery = noOpGLEndQuery; | 393 functions->fEndQuery = noOpGLEndQuery; |
396 functions->fFinish = noOpGLFinish; | 394 functions->fFinish = noOpGLFinish; |
397 functions->fFlush = noOpGLFlush; | 395 functions->fFlush = noOpGLFlush; |
398 functions->fFlushMappedBufferRange = nullGLFlushMappedBufferRange; | 396 functions->fFlushMappedBufferRange = nullGLFlushMappedBufferRange; |
399 functions->fFrontFace = noOpGLFrontFace; | 397 functions->fFrontFace = noOpGLFrontFace; |
400 functions->fGenBuffers = nullGLGenBuffers; | 398 functions->fGenBuffers = nullGLGenBuffers; |
401 functions->fGenerateMipmap = nullGLGenerateMipmap; | 399 functions->fGenerateMipmap = nullGLGenerateMipmap; |
402 functions->fGenQueries = noOpGLGenIds; | 400 functions->fGenQueries = noOpGLGenIds; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv; | 460 functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv; |
463 functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv; | 461 functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv; |
464 functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv; | 462 functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv; |
465 functions->fUnmapBuffer = nullGLUnmapBuffer; | 463 functions->fUnmapBuffer = nullGLUnmapBuffer; |
466 functions->fUseProgram = nullGLUseProgram; | 464 functions->fUseProgram = nullGLUseProgram; |
467 functions->fVertexAttrib1f = noOpGLVertexAttrib1f; | 465 functions->fVertexAttrib1f = noOpGLVertexAttrib1f; |
468 functions->fVertexAttrib2fv = noOpGLVertexAttrib2fv; | 466 functions->fVertexAttrib2fv = noOpGLVertexAttrib2fv; |
469 functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; | 467 functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; |
470 functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; | 468 functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; |
471 functions->fVertexAttribPointer = noOpGLVertexAttribPointer; | 469 functions->fVertexAttribPointer = noOpGLVertexAttribPointer; |
472 functions->fVertexAttribDivisor = noOpGLVertexAttribDivisor; | |
473 functions->fViewport = nullGLViewport; | 470 functions->fViewport = nullGLViewport; |
474 functions->fBindFramebuffer = nullGLBindFramebuffer; | 471 functions->fBindFramebuffer = nullGLBindFramebuffer; |
475 functions->fBindRenderbuffer = nullGLBindRenderbuffer; | 472 functions->fBindRenderbuffer = nullGLBindRenderbuffer; |
476 functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; | 473 functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; |
477 functions->fDeleteFramebuffers = nullGLDeleteFramebuffers; | 474 functions->fDeleteFramebuffers = nullGLDeleteFramebuffers; |
478 functions->fDeleteRenderbuffers = nullGLDeleteRenderbuffers; | 475 functions->fDeleteRenderbuffers = nullGLDeleteRenderbuffers; |
479 functions->fFramebufferRenderbuffer = nullGLFramebufferRenderbuffer; | 476 functions->fFramebufferRenderbuffer = nullGLFramebufferRenderbuffer; |
480 functions->fFramebufferTexture2D = nullGLFramebufferTexture2D; | 477 functions->fFramebufferTexture2D = nullGLFramebufferTexture2D; |
481 functions->fGenFramebuffers = noOpGLGenIds; | 478 functions->fGenFramebuffers = noOpGLGenIds; |
482 functions->fGenRenderbuffers = noOpGLGenIds; | 479 functions->fGenRenderbuffers = noOpGLGenIds; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(fStat
e); | 550 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(fStat
e); |
554 #endif | 551 #endif |
555 } | 552 } |
556 | 553 |
557 SkNullGLContext::~SkNullGLContext() { | 554 SkNullGLContext::~SkNullGLContext() { |
558 fGL.reset(NULL); | 555 fGL.reset(NULL); |
559 fState->unref(); | 556 fState->unref(); |
560 } | 557 } |
561 | 558 |
562 void SkNullGLContext::makeCurrent() const { set_current_context(fState); } | 559 void SkNullGLContext::makeCurrent() const { set_current_context(fState); } |
OLD | NEW |