| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 | 9 |
| 10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 SkAutoTUnref<GrGLInterface> fWrapped; | 784 SkAutoTUnref<GrGLInterface> fWrapped; |
| 785 | 785 |
| 786 typedef GrGLInterface INHERITED; | 786 typedef GrGLInterface INHERITED; |
| 787 }; | 787 }; |
| 788 | 788 |
| 789 //////////////////////////////////////////////////////////////////////////////// | 789 //////////////////////////////////////////////////////////////////////////////// |
| 790 const GrGLInterface* GrGLCreateDebugInterface() { | 790 const GrGLInterface* GrGLCreateDebugInterface() { |
| 791 GrGLInterface* interface = SkNEW(GrDebugGLInterface); | 791 GrGLInterface* interface = SkNEW(GrDebugGLInterface); |
| 792 | 792 |
| 793 interface->fStandard = kGL_GrGLStandard; | 793 interface->fStandard = kGL_GrGLStandard; |
| 794 interface->fActiveTexture = debugGLActiveTexture; | 794 |
| 795 interface->fAttachShader = debugGLAttachShader; | 795 GrGLInterface::Functions* functions = &interface->fFunctions; |
| 796 interface->fBeginQuery = debugGLBeginQuery; | 796 functions->fActiveTexture = debugGLActiveTexture; |
| 797 interface->fBindAttribLocation = debugGLBindAttribLocation; | 797 functions->fAttachShader = debugGLAttachShader; |
| 798 interface->fBindBuffer = debugGLBindBuffer; | 798 functions->fBeginQuery = debugGLBeginQuery; |
| 799 interface->fBindFragDataLocation = noOpGLBindFragDataLocation; | 799 functions->fBindAttribLocation = debugGLBindAttribLocation; |
| 800 interface->fBindTexture = debugGLBindTexture; | 800 functions->fBindBuffer = debugGLBindBuffer; |
| 801 interface->fBindVertexArray = debugGLBindVertexArray; | 801 functions->fBindFragDataLocation = noOpGLBindFragDataLocation; |
| 802 interface->fBlendColor = noOpGLBlendColor; | 802 functions->fBindTexture = debugGLBindTexture; |
| 803 interface->fBlendFunc = noOpGLBlendFunc; | 803 functions->fBindVertexArray = debugGLBindVertexArray; |
| 804 interface->fBufferData = debugGLBufferData; | 804 functions->fBlendColor = noOpGLBlendColor; |
| 805 interface->fBufferSubData = noOpGLBufferSubData; | 805 functions->fBlendFunc = noOpGLBlendFunc; |
| 806 interface->fClear = noOpGLClear; | 806 functions->fBufferData = debugGLBufferData; |
| 807 interface->fClearColor = noOpGLClearColor; | 807 functions->fBufferSubData = noOpGLBufferSubData; |
| 808 interface->fClearStencil = noOpGLClearStencil; | 808 functions->fClear = noOpGLClear; |
| 809 interface->fClientActiveTexture = debugGLClientActiveTexture; | 809 functions->fClearColor = noOpGLClearColor; |
| 810 interface->fColorMask = noOpGLColorMask; | 810 functions->fClearStencil = noOpGLClearStencil; |
| 811 interface->fCompileShader = noOpGLCompileShader; | 811 functions->fClientActiveTexture = debugGLClientActiveTexture; |
| 812 interface->fCompressedTexImage2D = noOpGLCompressedTexImage2D; | 812 functions->fColorMask = noOpGLColorMask; |
| 813 interface->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D; | 813 functions->fCompileShader = noOpGLCompileShader; |
| 814 interface->fCreateProgram = debugGLCreateProgram; | 814 functions->fCompressedTexImage2D = noOpGLCompressedTexImage2D; |
| 815 interface->fCreateShader = debugGLCreateShader; | 815 functions->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D; |
| 816 interface->fCullFace = noOpGLCullFace; | 816 functions->fCreateProgram = debugGLCreateProgram; |
| 817 interface->fDeleteBuffers = debugGLDeleteBuffers; | 817 functions->fCreateShader = debugGLCreateShader; |
| 818 interface->fDeleteProgram = debugGLDeleteProgram; | 818 functions->fCullFace = noOpGLCullFace; |
| 819 interface->fDeleteQueries = noOpGLDeleteIds; | 819 functions->fDeleteBuffers = debugGLDeleteBuffers; |
| 820 interface->fDeleteShader = debugGLDeleteShader; | 820 functions->fDeleteProgram = debugGLDeleteProgram; |
| 821 interface->fDeleteTextures = debugGLDeleteTextures; | 821 functions->fDeleteQueries = noOpGLDeleteIds; |
| 822 interface->fDeleteVertexArrays = debugGLDeleteVertexArrays; | 822 functions->fDeleteShader = debugGLDeleteShader; |
| 823 interface->fDepthMask = noOpGLDepthMask; | 823 functions->fDeleteTextures = debugGLDeleteTextures; |
| 824 interface->fDisable = noOpGLDisable; | 824 functions->fDeleteVertexArrays = debugGLDeleteVertexArrays; |
| 825 interface->fDisableClientState = noOpGLDisableClientState; | 825 functions->fDepthMask = noOpGLDepthMask; |
| 826 interface->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; | 826 functions->fDisable = noOpGLDisable; |
| 827 interface->fDrawArrays = noOpGLDrawArrays; | 827 functions->fDisableClientState = noOpGLDisableClientState; |
| 828 interface->fDrawBuffer = noOpGLDrawBuffer; | 828 functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; |
| 829 interface->fDrawBuffers = noOpGLDrawBuffers; | 829 functions->fDrawArrays = noOpGLDrawArrays; |
| 830 interface->fDrawElements = noOpGLDrawElements; | 830 functions->fDrawBuffer = noOpGLDrawBuffer; |
| 831 interface->fEnable = noOpGLEnable; | 831 functions->fDrawBuffers = noOpGLDrawBuffers; |
| 832 interface->fEnableClientState = noOpGLEnableClientState; | 832 functions->fDrawElements = noOpGLDrawElements; |
| 833 interface->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; | 833 functions->fEnable = noOpGLEnable; |
| 834 interface->fEndQuery = noOpGLEndQuery; | 834 functions->fEnableClientState = noOpGLEnableClientState; |
| 835 interface->fFinish = noOpGLFinish; | 835 functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; |
| 836 interface->fFlush = noOpGLFlush; | 836 functions->fEndQuery = noOpGLEndQuery; |
| 837 interface->fFrontFace = noOpGLFrontFace; | 837 functions->fFinish = noOpGLFinish; |
| 838 interface->fGenerateMipmap = debugGLGenerateMipmap; | 838 functions->fFlush = noOpGLFlush; |
| 839 interface->fGenBuffers = debugGLGenBuffers; | 839 functions->fFrontFace = noOpGLFrontFace; |
| 840 interface->fGenQueries = noOpGLGenIds; | 840 functions->fGenerateMipmap = debugGLGenerateMipmap; |
| 841 interface->fGenTextures = debugGLGenTextures; | 841 functions->fGenBuffers = debugGLGenBuffers; |
| 842 interface->fGetBufferParameteriv = debugGLGetBufferParameteriv; | 842 functions->fGenQueries = noOpGLGenIds; |
| 843 interface->fGetError = noOpGLGetError; | 843 functions->fGenTextures = debugGLGenTextures; |
| 844 interface->fGetIntegerv = noOpGLGetIntegerv; | 844 functions->fGetBufferParameteriv = debugGLGetBufferParameteriv; |
| 845 interface->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v; | 845 functions->fGetError = noOpGLGetError; |
| 846 interface->fGetQueryObjectiv = noOpGLGetQueryObjectiv; | 846 functions->fGetIntegerv = noOpGLGetIntegerv; |
| 847 interface->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v; | 847 functions->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v; |
| 848 interface->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv; | 848 functions->fGetQueryObjectiv = noOpGLGetQueryObjectiv; |
| 849 interface->fGetQueryiv = noOpGLGetQueryiv; | 849 functions->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v; |
| 850 interface->fGetProgramInfoLog = noOpGLGetInfoLog; | 850 functions->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv; |
| 851 interface->fGetProgramiv = noOpGLGetShaderOrProgramiv; | 851 functions->fGetQueryiv = noOpGLGetQueryiv; |
| 852 interface->fGetShaderInfoLog = noOpGLGetInfoLog; | 852 functions->fGetProgramInfoLog = noOpGLGetInfoLog; |
| 853 interface->fGetShaderiv = noOpGLGetShaderOrProgramiv; | 853 functions->fGetProgramiv = noOpGLGetShaderOrProgramiv; |
| 854 interface->fGetString = noOpGLGetString; | 854 functions->fGetShaderInfoLog = noOpGLGetInfoLog; |
| 855 interface->fGetStringi = noOpGLGetStringi; | 855 functions->fGetShaderiv = noOpGLGetShaderOrProgramiv; |
| 856 interface->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv; | 856 functions->fGetString = noOpGLGetString; |
| 857 interface->fGetUniformLocation = noOpGLGetUniformLocation; | 857 functions->fGetStringi = noOpGLGetStringi; |
| 858 interface->fGenVertexArrays = debugGLGenVertexArrays; | 858 functions->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv; |
| 859 interface->fLoadIdentity = noOpGLLoadIdentity; | 859 functions->fGetUniformLocation = noOpGLGetUniformLocation; |
| 860 interface->fLoadMatrixf = noOpGLLoadMatrixf; | 860 functions->fGenVertexArrays = debugGLGenVertexArrays; |
| 861 interface->fLineWidth = noOpGLLineWidth; | 861 functions->fLoadIdentity = noOpGLLoadIdentity; |
| 862 interface->fLinkProgram = noOpGLLinkProgram; | 862 functions->fLoadMatrixf = noOpGLLoadMatrixf; |
| 863 interface->fMatrixMode = noOpGLMatrixMode; | 863 functions->fLineWidth = noOpGLLineWidth; |
| 864 interface->fPixelStorei = debugGLPixelStorei; | 864 functions->fLinkProgram = noOpGLLinkProgram; |
| 865 interface->fQueryCounter = noOpGLQueryCounter; | 865 functions->fMatrixMode = noOpGLMatrixMode; |
| 866 interface->fReadBuffer = noOpGLReadBuffer; | 866 functions->fPixelStorei = debugGLPixelStorei; |
| 867 interface->fReadPixels = debugGLReadPixels; | 867 functions->fQueryCounter = noOpGLQueryCounter; |
| 868 interface->fScissor = noOpGLScissor; | 868 functions->fReadBuffer = noOpGLReadBuffer; |
| 869 interface->fShaderSource = noOpGLShaderSource; | 869 functions->fReadPixels = debugGLReadPixels; |
| 870 interface->fStencilFunc = noOpGLStencilFunc; | 870 functions->fScissor = noOpGLScissor; |
| 871 interface->fStencilFuncSeparate = noOpGLStencilFuncSeparate; | 871 functions->fShaderSource = noOpGLShaderSource; |
| 872 interface->fStencilMask = noOpGLStencilMask; | 872 functions->fStencilFunc = noOpGLStencilFunc; |
| 873 interface->fStencilMaskSeparate = noOpGLStencilMaskSeparate; | 873 functions->fStencilFuncSeparate = noOpGLStencilFuncSeparate; |
| 874 interface->fStencilOp = noOpGLStencilOp; | 874 functions->fStencilMask = noOpGLStencilMask; |
| 875 interface->fStencilOpSeparate = noOpGLStencilOpSeparate; | 875 functions->fStencilMaskSeparate = noOpGLStencilMaskSeparate; |
| 876 interface->fTexGenf = noOpGLTexGenf; | 876 functions->fStencilOp = noOpGLStencilOp; |
| 877 interface->fTexGenfv = noOpGLTexGenfv; | 877 functions->fStencilOpSeparate = noOpGLStencilOpSeparate; |
| 878 interface->fTexGeni = noOpGLTexGeni; | 878 functions->fTexGenf = noOpGLTexGenf; |
| 879 interface->fTexImage2D = noOpGLTexImage2D; | 879 functions->fTexGenfv = noOpGLTexGenfv; |
| 880 interface->fTexParameteri = noOpGLTexParameteri; | 880 functions->fTexGeni = noOpGLTexGeni; |
| 881 interface->fTexParameteriv = noOpGLTexParameteriv; | 881 functions->fTexImage2D = noOpGLTexImage2D; |
| 882 interface->fTexSubImage2D = noOpGLTexSubImage2D; | 882 functions->fTexParameteri = noOpGLTexParameteri; |
| 883 interface->fTexStorage2D = noOpGLTexStorage2D; | 883 functions->fTexParameteriv = noOpGLTexParameteriv; |
| 884 interface->fDiscardFramebuffer = noOpGLDiscardFramebuffer; | 884 functions->fTexSubImage2D = noOpGLTexSubImage2D; |
| 885 interface->fUniform1f = noOpGLUniform1f; | 885 functions->fTexStorage2D = noOpGLTexStorage2D; |
| 886 interface->fUniform1i = noOpGLUniform1i; | 886 functions->fDiscardFramebuffer = noOpGLDiscardFramebuffer; |
| 887 interface->fUniform1fv = noOpGLUniform1fv; | 887 functions->fUniform1f = noOpGLUniform1f; |
| 888 interface->fUniform1iv = noOpGLUniform1iv; | 888 functions->fUniform1i = noOpGLUniform1i; |
| 889 interface->fUniform2f = noOpGLUniform2f; | 889 functions->fUniform1fv = noOpGLUniform1fv; |
| 890 interface->fUniform2i = noOpGLUniform2i; | 890 functions->fUniform1iv = noOpGLUniform1iv; |
| 891 interface->fUniform2fv = noOpGLUniform2fv; | 891 functions->fUniform2f = noOpGLUniform2f; |
| 892 interface->fUniform2iv = noOpGLUniform2iv; | 892 functions->fUniform2i = noOpGLUniform2i; |
| 893 interface->fUniform3f = noOpGLUniform3f; | 893 functions->fUniform2fv = noOpGLUniform2fv; |
| 894 interface->fUniform3i = noOpGLUniform3i; | 894 functions->fUniform2iv = noOpGLUniform2iv; |
| 895 interface->fUniform3fv = noOpGLUniform3fv; | 895 functions->fUniform3f = noOpGLUniform3f; |
| 896 interface->fUniform3iv = noOpGLUniform3iv; | 896 functions->fUniform3i = noOpGLUniform3i; |
| 897 interface->fUniform4f = noOpGLUniform4f; | 897 functions->fUniform3fv = noOpGLUniform3fv; |
| 898 interface->fUniform4i = noOpGLUniform4i; | 898 functions->fUniform3iv = noOpGLUniform3iv; |
| 899 interface->fUniform4fv = noOpGLUniform4fv; | 899 functions->fUniform4f = noOpGLUniform4f; |
| 900 interface->fUniform4iv = noOpGLUniform4iv; | 900 functions->fUniform4i = noOpGLUniform4i; |
| 901 interface->fUniformMatrix2fv = noOpGLUniformMatrix2fv; | 901 functions->fUniform4fv = noOpGLUniform4fv; |
| 902 interface->fUniformMatrix3fv = noOpGLUniformMatrix3fv; | 902 functions->fUniform4iv = noOpGLUniform4iv; |
| 903 interface->fUniformMatrix4fv = noOpGLUniformMatrix4fv; | 903 functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv; |
| 904 interface->fUseProgram = debugGLUseProgram; | 904 functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv; |
| 905 interface->fVertexAttrib4fv = noOpGLVertexAttrib4fv; | 905 functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv; |
| 906 interface->fVertexAttribPointer = noOpGLVertexAttribPointer; | 906 functions->fUseProgram = debugGLUseProgram; |
| 907 interface->fVertexPointer = noOpGLVertexPointer; | 907 functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; |
| 908 interface->fViewport = noOpGLViewport; | 908 functions->fVertexAttribPointer = noOpGLVertexAttribPointer; |
| 909 interface->fBindFramebuffer = debugGLBindFramebuffer; | 909 functions->fVertexPointer = noOpGLVertexPointer; |
| 910 interface->fBindRenderbuffer = debugGLBindRenderbuffer; | 910 functions->fViewport = noOpGLViewport; |
| 911 interface->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; | 911 functions->fBindFramebuffer = debugGLBindFramebuffer; |
| 912 interface->fDeleteFramebuffers = debugGLDeleteFramebuffers; | 912 functions->fBindRenderbuffer = debugGLBindRenderbuffer; |
| 913 interface->fDeleteRenderbuffers = debugGLDeleteRenderbuffers; | 913 functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; |
| 914 interface->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer; | 914 functions->fDeleteFramebuffers = debugGLDeleteFramebuffers; |
| 915 interface->fFramebufferTexture2D = debugGLFramebufferTexture2D; | 915 functions->fDeleteRenderbuffers = debugGLDeleteRenderbuffers; |
| 916 interface->fGenFramebuffers = debugGLGenFramebuffers; | 916 functions->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer; |
| 917 interface->fGenRenderbuffers = debugGLGenRenderbuffers; | 917 functions->fFramebufferTexture2D = debugGLFramebufferTexture2D; |
| 918 interface->fGetFramebufferAttachmentParameteriv = | 918 functions->fGenFramebuffers = debugGLGenFramebuffers; |
| 919 functions->fGenRenderbuffers = debugGLGenRenderbuffers; |
| 920 functions->fGetFramebufferAttachmentParameteriv = |
| 919 noOpGLGetFramebufferAttachmentParameteriv; | 921 noOpGLGetFramebufferAttachmentParameteriv; |
| 920 interface->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv; | 922 functions->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv; |
| 921 interface->fRenderbufferStorage = noOpGLRenderbufferStorage; | 923 functions->fRenderbufferStorage = noOpGLRenderbufferStorage; |
| 922 interface->fRenderbufferStorageMultisample = | 924 functions->fRenderbufferStorageMultisample = |
| 923 noOpGLRenderbufferStorageMultisample; | 925 noOpGLRenderbufferStorageMultisample; |
| 924 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; | 926 functions->fBlitFramebuffer = noOpGLBlitFramebuffer; |
| 925 interface->fResolveMultisampleFramebuffer = | 927 functions->fResolveMultisampleFramebuffer = |
| 926 noOpGLResolveMultisampleFramebuffer; | 928 noOpGLResolveMultisampleFramebuffer; |
| 927 interface->fMapBuffer = debugGLMapBuffer; | 929 functions->fMapBuffer = debugGLMapBuffer; |
| 928 interface->fUnmapBuffer = debugGLUnmapBuffer; | 930 functions->fUnmapBuffer = debugGLUnmapBuffer; |
| 929 interface->fBindFragDataLocationIndexed = | 931 functions->fBindFragDataLocationIndexed = |
| 930 noOpGLBindFragDataLocationIndexed; | 932 noOpGLBindFragDataLocationIndexed; |
| 931 | 933 |
| 932 return interface; | 934 return interface; |
| 933 } | 935 } |
| OLD | NEW |