OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 5 #include "mojo/skia/gl_bindings_skia.h" |
6 | 6 |
7 #ifndef GL_GLEXT_PROTOTYPES | 7 #ifndef GL_GLEXT_PROTOTYPES |
8 #define GL_GLEXT_PROTOTYPES | 8 #define GL_GLEXT_PROTOTYPES |
9 #endif | 9 #endif |
10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "mojo/public/c/gpu/GLES2/gl2.h" |
11 #include "third_party/khronos/GLES2/gl2.h" | 11 #include "mojo/public/c/gpu/GLES2/gl2ext.h" |
12 #include "third_party/khronos/GLES2/gl2ext.h" | 12 #include "mojo/public/c/gpu/GLES2/gl2extmojo.h" |
13 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 13 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
14 | 14 |
15 namespace skia_bindings { | 15 namespace skia_bindings { |
16 | 16 |
17 GrGLInterface* CreateCommandBufferSkiaGLBinding() { | 17 GrGLInterface* CreateMojoSkiaGLBinding() { |
18 GrGLInterface* interface = new GrGLInterface; | 18 GrGLInterface* interface = new GrGLInterface; |
19 interface->fStandard = kGLES_GrGLStandard; | 19 interface->fStandard = kGLES_GrGLStandard; |
20 interface->fExtensions.init(kGLES_GrGLStandard, | 20 interface->fExtensions.init(kGLES_GrGLStandard, glGetString, nullptr, |
21 glGetString, | |
22 NULL, | |
23 glGetIntegerv); | 21 glGetIntegerv); |
24 | 22 |
25 GrGLInterface::Functions* functions = &interface->fFunctions; | 23 GrGLInterface::Functions* functions = &interface->fFunctions; |
26 functions->fActiveTexture = glActiveTexture; | 24 functions->fActiveTexture = glActiveTexture; |
27 functions->fAttachShader = glAttachShader; | 25 functions->fAttachShader = glAttachShader; |
28 functions->fBindAttribLocation = glBindAttribLocation; | 26 functions->fBindAttribLocation = glBindAttribLocation; |
29 functions->fBindBuffer = glBindBuffer; | 27 functions->fBindBuffer = glBindBuffer; |
30 functions->fBindTexture = glBindTexture; | 28 functions->fBindTexture = glBindTexture; |
31 functions->fBindVertexArray = glBindVertexArrayOES; | 29 functions->fBindVertexArray = glBindVertexArrayOES; |
32 functions->fBlendEquation = glBlendEquation; | 30 functions->fBlendEquation = glBlendEquation; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 functions->fVertexAttribPointer = glVertexAttribPointer; | 123 functions->fVertexAttribPointer = glVertexAttribPointer; |
126 functions->fViewport = glViewport; | 124 functions->fViewport = glViewport; |
127 functions->fBindFramebuffer = glBindFramebuffer; | 125 functions->fBindFramebuffer = glBindFramebuffer; |
128 functions->fBindRenderbuffer = glBindRenderbuffer; | 126 functions->fBindRenderbuffer = glBindRenderbuffer; |
129 functions->fCheckFramebufferStatus = glCheckFramebufferStatus; | 127 functions->fCheckFramebufferStatus = glCheckFramebufferStatus; |
130 functions->fDeleteFramebuffers = glDeleteFramebuffers; | 128 functions->fDeleteFramebuffers = glDeleteFramebuffers; |
131 functions->fDeleteRenderbuffers = glDeleteRenderbuffers; | 129 functions->fDeleteRenderbuffers = glDeleteRenderbuffers; |
132 functions->fFramebufferRenderbuffer = glFramebufferRenderbuffer; | 130 functions->fFramebufferRenderbuffer = glFramebufferRenderbuffer; |
133 functions->fFramebufferTexture2D = glFramebufferTexture2D; | 131 functions->fFramebufferTexture2D = glFramebufferTexture2D; |
134 functions->fFramebufferTexture2DMultisample = | 132 functions->fFramebufferTexture2DMultisample = |
135 glFramebufferTexture2DMultisampleEXT; | 133 glFramebufferTexture2DMultisampleEXT; |
136 functions->fGenFramebuffers = glGenFramebuffers; | 134 functions->fGenFramebuffers = glGenFramebuffers; |
137 functions->fGenRenderbuffers = glGenRenderbuffers; | 135 functions->fGenRenderbuffers = glGenRenderbuffers; |
138 functions->fGetFramebufferAttachmentParameteriv = | 136 functions->fGetFramebufferAttachmentParameteriv = |
139 glGetFramebufferAttachmentParameteriv; | 137 glGetFramebufferAttachmentParameteriv; |
140 functions->fGetRenderbufferParameteriv = glGetRenderbufferParameteriv; | 138 functions->fGetRenderbufferParameteriv = glGetRenderbufferParameteriv; |
141 functions->fRenderbufferStorage = glRenderbufferStorage; | 139 functions->fRenderbufferStorage = glRenderbufferStorage; |
142 functions->fRenderbufferStorageMultisample = | 140 functions->fRenderbufferStorageMultisample = nullptr; // TODO: Implement. |
143 glRenderbufferStorageMultisampleCHROMIUM; | |
144 functions->fRenderbufferStorageMultisampleES2EXT = | 141 functions->fRenderbufferStorageMultisampleES2EXT = |
145 glRenderbufferStorageMultisampleEXT; | 142 glRenderbufferStorageMultisampleEXT; |
146 functions->fBindUniformLocation = glBindUniformLocationCHROMIUM; | 143 functions->fBindUniformLocation = glBindUniformLocationCHROMIUM; |
147 functions->fBlitFramebuffer = glBlitFramebufferCHROMIUM; | 144 functions->fBlitFramebuffer = nullptr; // TODO: Implement. |
148 functions->fGenerateMipmap = glGenerateMipmap; | 145 functions->fGenerateMipmap = glGenerateMipmap; |
149 functions->fMatrixLoadf = glMatrixLoadfCHROMIUM; | 146 functions->fMatrixLoadf = nullptr; // TODO: Implement. |
150 functions->fMatrixLoadIdentity = glMatrixLoadIdentityCHROMIUM; | 147 functions->fMatrixLoadIdentity = nullptr; // TODO: Implement. |
151 | 148 |
152 return interface; | 149 return interface; |
153 } | 150 } |
154 | 151 |
155 } // namespace skia | 152 } // namespace skia |
OLD | NEW |