Don't add an aura tooltip to bubble close buttons on Windows.
[chromium-blink-merge.git] / gpu / skia_bindings / gl_bindings_skia_cmd_buffer.cc
blob1e997ba70ce10752b9565ab08434a74cbb792dff
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
7 #ifndef GL_GLEXT_PROTOTYPES
8 #define GL_GLEXT_PROTOTYPES
9 #endif
10 #include "gpu/GLES2/gl2extchromium.h"
11 #include "third_party/khronos/GLES2/gl2.h"
12 #include "third_party/khronos/GLES2/gl2ext.h"
13 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
15 namespace skia_bindings {
17 GrGLInterface* CreateCommandBufferSkiaGLBinding() {
18 GrGLInterface* interface = new GrGLInterface;
19 interface->fStandard = kGLES_GrGLStandard;
20 interface->fExtensions.init(kGLES_GrGLStandard,
21 glGetString,
22 NULL,
23 glGetIntegerv);
25 GrGLInterface::Functions* functions = &interface->fFunctions;
26 functions->fActiveTexture = glActiveTexture;
27 functions->fAttachShader = glAttachShader;
28 functions->fBindAttribLocation = glBindAttribLocation;
29 functions->fBindBuffer = glBindBuffer;
30 functions->fBindTexture = glBindTexture;
31 functions->fBindVertexArray = glBindVertexArrayOES;
32 functions->fBlendColor = glBlendColor;
33 functions->fBlendFunc = glBlendFunc;
34 functions->fBufferData = glBufferData;
35 functions->fBufferSubData = glBufferSubData;
36 functions->fClear = glClear;
37 functions->fClearColor = glClearColor;
38 functions->fClearStencil = glClearStencil;
39 functions->fColorMask = glColorMask;
40 functions->fCompileShader = glCompileShader;
41 functions->fCompressedTexImage2D = glCompressedTexImage2D;
42 functions->fCopyTexSubImage2D = glCopyTexSubImage2D;
43 functions->fCreateProgram = glCreateProgram;
44 functions->fCreateShader = glCreateShader;
45 functions->fCullFace = glCullFace;
46 functions->fDeleteBuffers = glDeleteBuffers;
47 functions->fDeleteProgram = glDeleteProgram;
48 functions->fDeleteShader = glDeleteShader;
49 functions->fDeleteTextures = glDeleteTextures;
50 functions->fDeleteVertexArrays = glDeleteVertexArraysOES;
51 functions->fDepthMask = glDepthMask;
52 functions->fDisable = glDisable;
53 functions->fDisableVertexAttribArray = glDisableVertexAttribArray;
54 functions->fDiscardFramebuffer = glDiscardFramebufferEXT;
55 functions->fDrawArrays = glDrawArrays;
56 functions->fDrawElements = glDrawElements;
57 functions->fEnable = glEnable;
58 functions->fEnableVertexAttribArray = glEnableVertexAttribArray;
59 functions->fFinish = glFinish;
60 functions->fFlush = glFlush;
61 functions->fFrontFace = glFrontFace;
62 functions->fGenBuffers = glGenBuffers;
63 functions->fGenTextures = glGenTextures;
64 functions->fGenVertexArrays = glGenVertexArraysOES;
65 functions->fGetBufferParameteriv = glGetBufferParameteriv;
66 functions->fGetError = glGetError;
67 functions->fGetIntegerv = glGetIntegerv;
68 functions->fGetProgramInfoLog = glGetProgramInfoLog;
69 functions->fGetProgramiv = glGetProgramiv;
70 functions->fGetShaderInfoLog = glGetShaderInfoLog;
71 functions->fGetShaderiv = glGetShaderiv;
72 functions->fGetShaderPrecisionFormat = glGetShaderPrecisionFormat;
73 functions->fGetString = glGetString;
74 functions->fGetUniformLocation = glGetUniformLocation;
75 functions->fInsertEventMarker = glInsertEventMarkerEXT;
76 functions->fLineWidth = glLineWidth;
77 functions->fLinkProgram = glLinkProgram;
78 functions->fMapBufferSubData = glMapBufferSubDataCHROMIUM;
79 functions->fMapTexSubImage2D = glMapTexSubImage2DCHROMIUM;
80 functions->fPixelStorei = glPixelStorei;
81 functions->fPopGroupMarker = glPopGroupMarkerEXT;
82 functions->fPushGroupMarker = glPushGroupMarkerEXT;
83 functions->fReadPixels = glReadPixels;
84 functions->fScissor = glScissor;
85 functions->fShaderSource = glShaderSource;
86 functions->fStencilFunc = glStencilFunc;
87 functions->fStencilFuncSeparate = glStencilFuncSeparate;
88 functions->fStencilMask = glStencilMask;
89 functions->fStencilMaskSeparate = glStencilMaskSeparate;
90 functions->fStencilOp = glStencilOp;
91 functions->fStencilOpSeparate = glStencilOpSeparate;
92 functions->fTexImage2D = glTexImage2D;
93 functions->fTexParameteri = glTexParameteri;
94 functions->fTexParameteriv = glTexParameteriv;
95 functions->fTexStorage2D = glTexStorage2DEXT;
96 functions->fTexSubImage2D = glTexSubImage2D;
97 functions->fUniform1f = glUniform1f;
98 functions->fUniform1i = glUniform1i;
99 functions->fUniform1fv = glUniform1fv;
100 functions->fUniform1iv = glUniform1iv;
101 functions->fUniform2f = glUniform2f;
102 functions->fUniform2i = glUniform2i;
103 functions->fUniform2fv = glUniform2fv;
104 functions->fUniform2iv = glUniform2iv;
105 functions->fUniform3f = glUniform3f;
106 functions->fUniform3i = glUniform3i;
107 functions->fUniform3fv = glUniform3fv;
108 functions->fUniform3iv = glUniform3iv;
109 functions->fUniform4f = glUniform4f;
110 functions->fUniform4i = glUniform4i;
111 functions->fUniform4fv = glUniform4fv;
112 functions->fUniform4iv = glUniform4iv;
113 functions->fUniformMatrix2fv = glUniformMatrix2fv;
114 functions->fUniformMatrix3fv = glUniformMatrix3fv;
115 functions->fUniformMatrix4fv = glUniformMatrix4fv;
116 functions->fUnmapBufferSubData = glUnmapBufferSubDataCHROMIUM;
117 functions->fUnmapTexSubImage2D = glUnmapTexSubImage2DCHROMIUM;
118 functions->fUseProgram = glUseProgram;
119 functions->fVertexAttrib1f = glVertexAttrib1f;
120 functions->fVertexAttrib2fv = glVertexAttrib2fv;
121 functions->fVertexAttrib3fv = glVertexAttrib3fv;
122 functions->fVertexAttrib4fv = glVertexAttrib4fv;
123 functions->fVertexAttribPointer = glVertexAttribPointer;
124 functions->fViewport = glViewport;
125 functions->fBindFramebuffer = glBindFramebuffer;
126 functions->fBindRenderbuffer = glBindRenderbuffer;
127 functions->fCheckFramebufferStatus = glCheckFramebufferStatus;
128 functions->fDeleteFramebuffers = glDeleteFramebuffers;
129 functions->fDeleteRenderbuffers = glDeleteRenderbuffers;
130 functions->fFramebufferRenderbuffer = glFramebufferRenderbuffer;
131 functions->fFramebufferTexture2D = glFramebufferTexture2D;
132 functions->fFramebufferTexture2DMultisample =
133 glFramebufferTexture2DMultisampleEXT;
134 functions->fGenFramebuffers = glGenFramebuffers;
135 functions->fGenRenderbuffers = glGenRenderbuffers;
136 functions->fGetFramebufferAttachmentParameteriv =
137 glGetFramebufferAttachmentParameteriv;
138 functions->fGetRenderbufferParameteriv = glGetRenderbufferParameteriv;
139 functions->fRenderbufferStorage = glRenderbufferStorage;
140 functions->fRenderbufferStorageMultisample =
141 glRenderbufferStorageMultisampleCHROMIUM;
142 functions->fRenderbufferStorageMultisampleES2EXT =
143 glRenderbufferStorageMultisampleEXT;
144 functions->fBindUniformLocation = glBindUniformLocationCHROMIUM;
145 functions->fBlitFramebuffer = glBlitFramebufferCHROMIUM;
146 functions->fGenerateMipmap = glGenerateMipmap;
147 functions->fMatrixLoadf = glMatrixLoadfCHROMIUM;
148 functions->fMatrixLoadIdentity = glMatrixLoadIdentityCHROMIUM;
150 return interface;
153 } // namespace skia