| 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 "base/atomicops.h" | 7 #include "base/atomicops.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dboolean normalized, | 702 WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dboolean normalized, |
| 703 WGC3Dsizei stride, WGC3Dintptr offset) { | 703 WGC3Dsizei stride, WGC3Dintptr offset) { |
| 704 gl_->VertexAttribPointer( | 704 gl_->VertexAttribPointer( |
| 705 index, size, type, normalized, stride, | 705 index, size, type, normalized, stride, |
| 706 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); | 706 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); |
| 707 } | 707 } |
| 708 | 708 |
| 709 DELEGATE_TO_GL_4(viewport, Viewport, | 709 DELEGATE_TO_GL_4(viewport, Viewport, |
| 710 WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei) | 710 WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei) |
| 711 | 711 |
| 712 DELEGATE_TO_GL_2(genBuffers, GenBuffers, WGC3Dsizei, WebGLId*); | |
| 713 | |
| 714 DELEGATE_TO_GL_2(genFramebuffers, GenFramebuffers, WGC3Dsizei, WebGLId*); | |
| 715 | |
| 716 DELEGATE_TO_GL_2(genRenderbuffers, GenRenderbuffers, WGC3Dsizei, WebGLId*); | |
| 717 | |
| 718 DELEGATE_TO_GL_2(genTextures, GenTextures, WGC3Dsizei, WebGLId*); | |
| 719 | |
| 720 DELEGATE_TO_GL_2(deleteBuffers, DeleteBuffers, WGC3Dsizei, WebGLId*); | |
| 721 | |
| 722 DELEGATE_TO_GL_2(deleteFramebuffers, DeleteFramebuffers, WGC3Dsizei, WebGLId*); | |
| 723 | |
| 724 DELEGATE_TO_GL_2(deleteRenderbuffers, DeleteRenderbuffers, WGC3Dsizei, | |
| 725 WebGLId*); | |
| 726 | |
| 727 DELEGATE_TO_GL_2(deleteTextures, DeleteTextures, WGC3Dsizei, WebGLId*); | |
| 728 | |
| 729 WebGLId WebGraphicsContext3DImpl::createBuffer() { | 712 WebGLId WebGraphicsContext3DImpl::createBuffer() { |
| 730 GLuint o; | 713 GLuint o; |
| 731 gl_->GenBuffers(1, &o); | 714 gl_->GenBuffers(1, &o); |
| 732 return o; | 715 return o; |
| 733 } | 716 } |
| 734 | 717 |
| 735 WebGLId WebGraphicsContext3DImpl::createFramebuffer() { | 718 WebGLId WebGraphicsContext3DImpl::createFramebuffer() { |
| 736 GLuint o = 0; | 719 GLuint o = 0; |
| 737 gl_->GenFramebuffers(1, &o); | 720 gl_->GenFramebuffers(1, &o); |
| 738 return o; | 721 return o; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 output_attribs->depth_size = attributes.depth ? 24 : 0; | 1009 output_attribs->depth_size = attributes.depth ? 24 : 0; |
| 1027 output_attribs->stencil_size = attributes.stencil ? 8 : 0; | 1010 output_attribs->stencil_size = attributes.stencil ? 8 : 0; |
| 1028 output_attribs->samples = attributes.antialias ? 4 : 0; | 1011 output_attribs->samples = attributes.antialias ? 4 : 0; |
| 1029 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1012 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
| 1030 output_attribs->fail_if_major_perf_caveat = | 1013 output_attribs->fail_if_major_perf_caveat = |
| 1031 attributes.failIfMajorPerformanceCaveat; | 1014 attributes.failIfMajorPerformanceCaveat; |
| 1032 output_attribs->bind_generates_resource = false; | 1015 output_attribs->bind_generates_resource = false; |
| 1033 } | 1016 } |
| 1034 | 1017 |
| 1035 } // namespace gpu_blink | 1018 } // namespace gpu_blink |
| OLD | NEW |