OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/blink/webgraphicscontext3d_impl.h" | 5 #include "gpu/blink/webgraphicscontext3d_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 } | 334 } |
335 | 335 |
336 DELEGATE_TO_GL_1(enable, Enable, WGC3Denum) | 336 DELEGATE_TO_GL_1(enable, Enable, WGC3Denum) |
337 | 337 |
338 DELEGATE_TO_GL_1(enableVertexAttribArray, EnableVertexAttribArray, | 338 DELEGATE_TO_GL_1(enableVertexAttribArray, EnableVertexAttribArray, |
339 WGC3Duint) | 339 WGC3Duint) |
340 | 340 |
341 DELEGATE_TO_GL(finish, Finish) | 341 DELEGATE_TO_GL(finish, Finish) |
342 DELEGATE_TO_GL(flush, Flush) | 342 DELEGATE_TO_GL(flush, Flush) |
343 | 343 |
344 DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbuffer, | |
345 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId) | |
346 | |
347 DELEGATE_TO_GL_5(framebufferTexture2D, FramebufferTexture2D, | |
348 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint) | |
349 | |
350 DELEGATE_TO_GL_1(frontFace, FrontFace, WGC3Denum) | 344 DELEGATE_TO_GL_1(frontFace, FrontFace, WGC3Denum) |
351 | 345 |
352 DELEGATE_TO_GL_1(generateMipmap, GenerateMipmap, WGC3Denum) | 346 DELEGATE_TO_GL_1(generateMipmap, GenerateMipmap, WGC3Denum) |
353 | 347 |
354 bool WebGraphicsContext3DImpl::getActiveAttrib( | 348 bool WebGraphicsContext3DImpl::getActiveAttrib( |
355 WebGLId program, WGC3Duint index, ActiveInfo& info) { | 349 WebGLId program, WGC3Duint index, ActiveInfo& info) { |
356 if (!program) { | 350 if (!program) { |
357 synthesizeGLError(GL_INVALID_VALUE); | 351 synthesizeGLError(GL_INVALID_VALUE); |
358 return false; | 352 return false; |
359 } | 353 } |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 WGC3Denum mode, WGC3Duint start, WGC3Duint end, WGC3Dsizei count, | 1005 WGC3Denum mode, WGC3Duint start, WGC3Duint end, WGC3Dsizei count, |
1012 WGC3Denum type, WGC3Dintptr offset) { | 1006 WGC3Denum type, WGC3Dintptr offset) { |
1013 gl_->DrawRangeElements(mode, start, end, count, type, | 1007 gl_->DrawRangeElements(mode, start, end, count, type, |
1014 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); | 1008 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); |
1015 } | 1009 } |
1016 DELEGATE_TO_GL(endTransformFeedback, EndTransformFeedback) | 1010 DELEGATE_TO_GL(endTransformFeedback, EndTransformFeedback) |
1017 WGC3Dsync WebGraphicsContext3DImpl::fenceSync(WGC3Denum condition, | 1011 WGC3Dsync WebGraphicsContext3DImpl::fenceSync(WGC3Denum condition, |
1018 WGC3Dbitfield flags) { | 1012 WGC3Dbitfield flags) { |
1019 return reinterpret_cast<WGC3Dsync>(gl_->FenceSync(condition, flags)); | 1013 return reinterpret_cast<WGC3Dsync>(gl_->FenceSync(condition, flags)); |
1020 } | 1014 } |
1021 DELEGATE_TO_GL_5(framebufferTextureLayer, FramebufferTextureLayer, WGC3Denum, | |
1022 WGC3Denum, WGC3Duint, WGC3Dint, WGC3Dint) | |
1023 DELEGATE_TO_GL_5(getActiveUniformBlockName, GetActiveUniformBlockName, | 1015 DELEGATE_TO_GL_5(getActiveUniformBlockName, GetActiveUniformBlockName, |
1024 WGC3Duint, WGC3Duint, WGC3Dsizei, WGC3Dsizei *, WGC3Dchar *) | 1016 WGC3Duint, WGC3Duint, WGC3Dsizei, WGC3Dsizei *, WGC3Dchar *) |
1025 DELEGATE_TO_GL_4(getActiveUniformBlockiv, GetActiveUniformBlockiv, WGC3Duint, | 1017 DELEGATE_TO_GL_4(getActiveUniformBlockiv, GetActiveUniformBlockiv, WGC3Duint, |
1026 WGC3Duint, WGC3Denum, WGC3Dint *) | 1018 WGC3Duint, WGC3Denum, WGC3Dint *) |
1027 DELEGATE_TO_GL_5(getActiveUniformsiv, GetActiveUniformsiv, WGC3Duint, | 1019 DELEGATE_TO_GL_5(getActiveUniformsiv, GetActiveUniformsiv, WGC3Duint, |
1028 WGC3Dsizei, const WGC3Duint *, WGC3Denum, WGC3Dint *) | 1020 WGC3Dsizei, const WGC3Duint *, WGC3Denum, WGC3Dint *) |
1029 DELEGATE_TO_GL_2R(getFragDataLocation, GetFragDataLocation, WGC3Duint, | 1021 DELEGATE_TO_GL_2R(getFragDataLocation, GetFragDataLocation, WGC3Duint, |
1030 const WGC3Dchar *, WGC3Dint) | 1022 const WGC3Dchar *, WGC3Dint) |
1031 DELEGATE_TO_GL_5(getInternalformativ, GetInternalformativ, WGC3Denum, WGC3Denum, | 1023 DELEGATE_TO_GL_5(getInternalformativ, GetInternalformativ, WGC3Denum, WGC3Denum, |
1032 WGC3Denum, WGC3Dsizei, WGC3Dint *) | 1024 WGC3Denum, WGC3Dsizei, WGC3Dint *) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; | 1183 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; |
1192 break; | 1184 break; |
1193 default: | 1185 default: |
1194 NOTREACHED(); | 1186 NOTREACHED(); |
1195 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; | 1187 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
1196 break; | 1188 break; |
1197 } | 1189 } |
1198 } | 1190 } |
1199 | 1191 |
1200 } // namespace gpu_blink | 1192 } // namespace gpu_blink |
OLD | NEW |