Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Side by Side Diff: src/gpu/gl/debug/GrGLCreateDebugInterface.cpp

Issue 130423013: Use vertex buffer objects instead of client side arrays in fixed-function codepaths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 //////////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////////
26 GrGLvoid GR_GL_FUNCTION_TYPE debugGLActiveTexture(GrGLenum texture) { 26 GrGLvoid GR_GL_FUNCTION_TYPE debugGLActiveTexture(GrGLenum texture) {
27 27
28 // Ganesh offsets the texture unit indices 28 // Ganesh offsets the texture unit indices
29 texture -= GR_GL_TEXTURE0; 29 texture -= GR_GL_TEXTURE0;
30 GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits()); 30 GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits());
31 31
32 GrDebugGL::getInstance()->setCurTextureUnit(texture); 32 GrDebugGL::getInstance()->setCurTextureUnit(texture);
33 } 33 }
34 34
35 GrGLvoid GR_GL_FUNCTION_TYPE debugGLClientActiveTexture(GrGLenum texture) {
36
37 // Ganesh offsets the texture unit indices
38 texture -= GR_GL_TEXTURE0;
39 GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits());
40 }
41
42 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
43 GrGLvoid GR_GL_FUNCTION_TYPE debugGLAttachShader(GrGLuint programID, 36 GrGLvoid GR_GL_FUNCTION_TYPE debugGLAttachShader(GrGLuint programID,
44 GrGLuint shaderID) { 37 GrGLuint shaderID) {
45 38
46 GrProgramObj *program = GR_FIND(programID, GrProgramObj, 39 GrProgramObj *program = GR_FIND(programID, GrProgramObj,
47 GrDebugGL::kProgram_ObjTypes); 40 GrDebugGL::kProgram_ObjTypes);
48 GrAlwaysAssert(program); 41 GrAlwaysAssert(program);
49 42
50 GrShaderObj *shader = GR_FIND(shaderID, 43 GrShaderObj *shader = GR_FIND(shaderID,
51 GrShaderObj, 44 GrShaderObj,
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 functions->fBindFragDataLocation = noOpGLBindFragDataLocation; 794 functions->fBindFragDataLocation = noOpGLBindFragDataLocation;
802 functions->fBindTexture = debugGLBindTexture; 795 functions->fBindTexture = debugGLBindTexture;
803 functions->fBindVertexArray = debugGLBindVertexArray; 796 functions->fBindVertexArray = debugGLBindVertexArray;
804 functions->fBlendColor = noOpGLBlendColor; 797 functions->fBlendColor = noOpGLBlendColor;
805 functions->fBlendFunc = noOpGLBlendFunc; 798 functions->fBlendFunc = noOpGLBlendFunc;
806 functions->fBufferData = debugGLBufferData; 799 functions->fBufferData = debugGLBufferData;
807 functions->fBufferSubData = noOpGLBufferSubData; 800 functions->fBufferSubData = noOpGLBufferSubData;
808 functions->fClear = noOpGLClear; 801 functions->fClear = noOpGLClear;
809 functions->fClearColor = noOpGLClearColor; 802 functions->fClearColor = noOpGLClearColor;
810 functions->fClearStencil = noOpGLClearStencil; 803 functions->fClearStencil = noOpGLClearStencil;
811 functions->fClientActiveTexture = debugGLClientActiveTexture;
812 functions->fColorMask = noOpGLColorMask; 804 functions->fColorMask = noOpGLColorMask;
813 functions->fCompileShader = noOpGLCompileShader; 805 functions->fCompileShader = noOpGLCompileShader;
814 functions->fCompressedTexImage2D = noOpGLCompressedTexImage2D; 806 functions->fCompressedTexImage2D = noOpGLCompressedTexImage2D;
815 functions->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D; 807 functions->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D;
816 functions->fCreateProgram = debugGLCreateProgram; 808 functions->fCreateProgram = debugGLCreateProgram;
817 functions->fCreateShader = debugGLCreateShader; 809 functions->fCreateShader = debugGLCreateShader;
818 functions->fCullFace = noOpGLCullFace; 810 functions->fCullFace = noOpGLCullFace;
819 functions->fDeleteBuffers = debugGLDeleteBuffers; 811 functions->fDeleteBuffers = debugGLDeleteBuffers;
820 functions->fDeleteProgram = debugGLDeleteProgram; 812 functions->fDeleteProgram = debugGLDeleteProgram;
821 functions->fDeleteQueries = noOpGLDeleteIds; 813 functions->fDeleteQueries = noOpGLDeleteIds;
822 functions->fDeleteShader = debugGLDeleteShader; 814 functions->fDeleteShader = debugGLDeleteShader;
823 functions->fDeleteTextures = debugGLDeleteTextures; 815 functions->fDeleteTextures = debugGLDeleteTextures;
824 functions->fDeleteVertexArrays = debugGLDeleteVertexArrays; 816 functions->fDeleteVertexArrays = debugGLDeleteVertexArrays;
825 functions->fDepthMask = noOpGLDepthMask; 817 functions->fDepthMask = noOpGLDepthMask;
826 functions->fDisable = noOpGLDisable; 818 functions->fDisable = noOpGLDisable;
827 functions->fDisableClientState = noOpGLDisableClientState;
828 functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; 819 functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray;
829 functions->fDrawArrays = noOpGLDrawArrays; 820 functions->fDrawArrays = noOpGLDrawArrays;
830 functions->fDrawBuffer = noOpGLDrawBuffer; 821 functions->fDrawBuffer = noOpGLDrawBuffer;
831 functions->fDrawBuffers = noOpGLDrawBuffers; 822 functions->fDrawBuffers = noOpGLDrawBuffers;
832 functions->fDrawElements = noOpGLDrawElements; 823 functions->fDrawElements = noOpGLDrawElements;
833 functions->fEnable = noOpGLEnable; 824 functions->fEnable = noOpGLEnable;
834 functions->fEnableClientState = noOpGLEnableClientState;
835 functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; 825 functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray;
836 functions->fEndQuery = noOpGLEndQuery; 826 functions->fEndQuery = noOpGLEndQuery;
837 functions->fFinish = noOpGLFinish; 827 functions->fFinish = noOpGLFinish;
838 functions->fFlush = noOpGLFlush; 828 functions->fFlush = noOpGLFlush;
839 functions->fFrontFace = noOpGLFrontFace; 829 functions->fFrontFace = noOpGLFrontFace;
840 functions->fGenerateMipmap = debugGLGenerateMipmap; 830 functions->fGenerateMipmap = debugGLGenerateMipmap;
841 functions->fGenBuffers = debugGLGenBuffers; 831 functions->fGenBuffers = debugGLGenBuffers;
842 functions->fGenQueries = noOpGLGenIds; 832 functions->fGenQueries = noOpGLGenIds;
843 functions->fGenTextures = debugGLGenTextures; 833 functions->fGenTextures = debugGLGenTextures;
844 functions->fGetBufferParameteriv = debugGLGetBufferParameteriv; 834 functions->fGetBufferParameteriv = debugGLGetBufferParameteriv;
(...skipping 23 matching lines...) Expand all
868 functions->fReadBuffer = noOpGLReadBuffer; 858 functions->fReadBuffer = noOpGLReadBuffer;
869 functions->fReadPixels = debugGLReadPixels; 859 functions->fReadPixels = debugGLReadPixels;
870 functions->fScissor = noOpGLScissor; 860 functions->fScissor = noOpGLScissor;
871 functions->fShaderSource = noOpGLShaderSource; 861 functions->fShaderSource = noOpGLShaderSource;
872 functions->fStencilFunc = noOpGLStencilFunc; 862 functions->fStencilFunc = noOpGLStencilFunc;
873 functions->fStencilFuncSeparate = noOpGLStencilFuncSeparate; 863 functions->fStencilFuncSeparate = noOpGLStencilFuncSeparate;
874 functions->fStencilMask = noOpGLStencilMask; 864 functions->fStencilMask = noOpGLStencilMask;
875 functions->fStencilMaskSeparate = noOpGLStencilMaskSeparate; 865 functions->fStencilMaskSeparate = noOpGLStencilMaskSeparate;
876 functions->fStencilOp = noOpGLStencilOp; 866 functions->fStencilOp = noOpGLStencilOp;
877 functions->fStencilOpSeparate = noOpGLStencilOpSeparate; 867 functions->fStencilOpSeparate = noOpGLStencilOpSeparate;
878 functions->fTexGenf = noOpGLTexGenf;
879 functions->fTexGenfv = noOpGLTexGenfv; 868 functions->fTexGenfv = noOpGLTexGenfv;
880 functions->fTexGeni = noOpGLTexGeni; 869 functions->fTexGeni = noOpGLTexGeni;
881 functions->fTexImage2D = noOpGLTexImage2D; 870 functions->fTexImage2D = noOpGLTexImage2D;
882 functions->fTexParameteri = noOpGLTexParameteri; 871 functions->fTexParameteri = noOpGLTexParameteri;
883 functions->fTexParameteriv = noOpGLTexParameteriv; 872 functions->fTexParameteriv = noOpGLTexParameteriv;
884 functions->fTexSubImage2D = noOpGLTexSubImage2D; 873 functions->fTexSubImage2D = noOpGLTexSubImage2D;
885 functions->fTexStorage2D = noOpGLTexStorage2D; 874 functions->fTexStorage2D = noOpGLTexStorage2D;
886 functions->fDiscardFramebuffer = noOpGLDiscardFramebuffer; 875 functions->fDiscardFramebuffer = noOpGLDiscardFramebuffer;
887 functions->fUniform1f = noOpGLUniform1f; 876 functions->fUniform1f = noOpGLUniform1f;
888 functions->fUniform1i = noOpGLUniform1i; 877 functions->fUniform1i = noOpGLUniform1i;
(...skipping 10 matching lines...) Expand all
899 functions->fUniform4f = noOpGLUniform4f; 888 functions->fUniform4f = noOpGLUniform4f;
900 functions->fUniform4i = noOpGLUniform4i; 889 functions->fUniform4i = noOpGLUniform4i;
901 functions->fUniform4fv = noOpGLUniform4fv; 890 functions->fUniform4fv = noOpGLUniform4fv;
902 functions->fUniform4iv = noOpGLUniform4iv; 891 functions->fUniform4iv = noOpGLUniform4iv;
903 functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv; 892 functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv;
904 functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv; 893 functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv;
905 functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv; 894 functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv;
906 functions->fUseProgram = debugGLUseProgram; 895 functions->fUseProgram = debugGLUseProgram;
907 functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; 896 functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
908 functions->fVertexAttribPointer = noOpGLVertexAttribPointer; 897 functions->fVertexAttribPointer = noOpGLVertexAttribPointer;
909 functions->fVertexPointer = noOpGLVertexPointer;
910 functions->fViewport = noOpGLViewport; 898 functions->fViewport = noOpGLViewport;
911 functions->fBindFramebuffer = debugGLBindFramebuffer; 899 functions->fBindFramebuffer = debugGLBindFramebuffer;
912 functions->fBindRenderbuffer = debugGLBindRenderbuffer; 900 functions->fBindRenderbuffer = debugGLBindRenderbuffer;
913 functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; 901 functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus;
914 functions->fDeleteFramebuffers = debugGLDeleteFramebuffers; 902 functions->fDeleteFramebuffers = debugGLDeleteFramebuffers;
915 functions->fDeleteRenderbuffers = debugGLDeleteRenderbuffers; 903 functions->fDeleteRenderbuffers = debugGLDeleteRenderbuffers;
916 functions->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer; 904 functions->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer;
917 functions->fFramebufferTexture2D = debugGLFramebufferTexture2D; 905 functions->fFramebufferTexture2D = debugGLFramebufferTexture2D;
918 functions->fGenFramebuffers = debugGLGenFramebuffers; 906 functions->fGenFramebuffers = debugGLGenFramebuffers;
919 functions->fGenRenderbuffers = debugGLGenRenderbuffers; 907 functions->fGenRenderbuffers = debugGLGenRenderbuffers;
920 functions->fGetFramebufferAttachmentParameteriv = 908 functions->fGetFramebufferAttachmentParameteriv =
921 noOpGLGetFramebufferAttachmentParameteriv; 909 noOpGLGetFramebufferAttachmentParameteriv;
922 functions->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv; 910 functions->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv;
923 functions->fRenderbufferStorage = noOpGLRenderbufferStorage; 911 functions->fRenderbufferStorage = noOpGLRenderbufferStorage;
924 functions->fRenderbufferStorageMultisample = 912 functions->fRenderbufferStorageMultisample =
925 noOpGLRenderbufferStorageMultisample; 913 noOpGLRenderbufferStorageMultisample;
926 functions->fBlitFramebuffer = noOpGLBlitFramebuffer; 914 functions->fBlitFramebuffer = noOpGLBlitFramebuffer;
927 functions->fResolveMultisampleFramebuffer = 915 functions->fResolveMultisampleFramebuffer =
928 noOpGLResolveMultisampleFramebuffer; 916 noOpGLResolveMultisampleFramebuffer;
929 functions->fMapBuffer = debugGLMapBuffer; 917 functions->fMapBuffer = debugGLMapBuffer;
930 functions->fUnmapBuffer = debugGLUnmapBuffer; 918 functions->fUnmapBuffer = debugGLUnmapBuffer;
931 functions->fBindFragDataLocationIndexed = 919 functions->fBindFragDataLocationIndexed =
932 noOpGLBindFragDataLocationIndexed; 920 noOpGLBindFragDataLocationIndexed;
933 921
934 return interface; 922 return interface;
935 } 923 }
OLDNEW
« no previous file with comments | « src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp ('k') | src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698