| 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 "webkit/common/gpu/webgraphicscontext3d_impl.h" | 5 #include "webkit/common/gpu/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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, | 839 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, |
| 840 WGC3Denum, const WGC3Dbyte*) | 840 WGC3Denum, const WGC3Dbyte*) |
| 841 DELEGATE_TO_GL_3(produceTextureDirectCHROMIUM, ProduceTextureDirectCHROMIUM, | 841 DELEGATE_TO_GL_3(produceTextureDirectCHROMIUM, ProduceTextureDirectCHROMIUM, |
| 842 WebGLId, WGC3Denum, const WGC3Dbyte*) | 842 WebGLId, WGC3Denum, const WGC3Dbyte*) |
| 843 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, | 843 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, |
| 844 WGC3Denum, const WGC3Dbyte*) | 844 WGC3Denum, const WGC3Dbyte*) |
| 845 DELEGATE_TO_GL_2R(createAndConsumeTextureCHROMIUM, | 845 DELEGATE_TO_GL_2R(createAndConsumeTextureCHROMIUM, |
| 846 CreateAndConsumeTextureCHROMIUM, | 846 CreateAndConsumeTextureCHROMIUM, |
| 847 WGC3Denum, const WGC3Dbyte*, WebGLId) | 847 WGC3Denum, const WGC3Dbyte*, WebGLId) |
| 848 | 848 |
| 849 DELEGATE_TO_GL_2(genValuebuffersCHROMIUM, |
| 850 GenValuebuffersCHROMIUM, |
| 851 WGC3Dsizei, |
| 852 WebGLId*); |
| 853 |
| 854 WebGLId WebGraphicsContext3DImpl::createValuebufferCHROMIUM() { |
| 855 GLuint o; |
| 856 gl_->GenValuebuffersCHROMIUM(1, &o); |
| 857 return o; |
| 858 } |
| 859 |
| 860 DELEGATE_TO_GL_2(deleteValuebuffersCHROMIUM, |
| 861 DeleteValuebuffersCHROMIUM, |
| 862 WGC3Dsizei, |
| 863 WebGLId*); |
| 864 |
| 865 void WebGraphicsContext3DImpl::deleteValuebufferCHROMIUM(WebGLId valuebuffer) { |
| 866 gl_->DeleteValuebuffersCHROMIUM(1, &valuebuffer); |
| 867 } |
| 868 |
| 869 DELEGATE_TO_GL_1RB(isValuebufferCHROMIUM, |
| 870 IsValuebufferCHROMIUM, |
| 871 WebGLId, |
| 872 WGC3Dboolean) |
| 873 DELEGATE_TO_GL_2(bindValuebufferCHROMIUM, |
| 874 BindValuebufferCHROMIUM, |
| 875 WGC3Denum, |
| 876 WebGLId) |
| 877 DELEGATE_TO_GL_2(subscribeValueCHROMIUM, |
| 878 SubscribeValueCHROMIUM, |
| 879 WGC3Denum, |
| 880 WGC3Denum); |
| 881 DELEGATE_TO_GL_1(populateSubscribedValuesCHROMIUM, |
| 882 PopulateSubscribedValuesCHROMIUM, |
| 883 WGC3Denum); |
| 884 DELEGATE_TO_GL_3(uniformValuebufferCHROMIUM, |
| 885 UniformValuebufferCHROMIUM, |
| 886 WGC3Dint, |
| 887 WGC3Denum, |
| 888 WGC3Denum); |
| 889 |
| 849 void WebGraphicsContext3DImpl::insertEventMarkerEXT( | 890 void WebGraphicsContext3DImpl::insertEventMarkerEXT( |
| 850 const WGC3Dchar* marker) { | 891 const WGC3Dchar* marker) { |
| 851 gl_->InsertEventMarkerEXT(0, marker); | 892 gl_->InsertEventMarkerEXT(0, marker); |
| 852 } | 893 } |
| 853 | 894 |
| 854 void WebGraphicsContext3DImpl::pushGroupMarkerEXT( | 895 void WebGraphicsContext3DImpl::pushGroupMarkerEXT( |
| 855 const WGC3Dchar* marker) { | 896 const WGC3Dchar* marker) { |
| 856 gl_->PushGroupMarkerEXT(0, marker); | 897 gl_->PushGroupMarkerEXT(0, marker); |
| 857 } | 898 } |
| 858 | 899 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 output_attribs->stencil_size = attributes.stencil ? 8 : 0; | 1023 output_attribs->stencil_size = attributes.stencil ? 8 : 0; |
| 983 output_attribs->samples = attributes.antialias ? 4 : 0; | 1024 output_attribs->samples = attributes.antialias ? 4 : 0; |
| 984 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1025 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
| 985 output_attribs->fail_if_major_perf_caveat = | 1026 output_attribs->fail_if_major_perf_caveat = |
| 986 attributes.failIfMajorPerformanceCaveat; | 1027 attributes.failIfMajorPerformanceCaveat; |
| 987 output_attribs->bind_generates_resource = false; | 1028 output_attribs->bind_generates_resource = false; |
| 988 } | 1029 } |
| 989 | 1030 |
| 990 } // namespace gpu | 1031 } // namespace gpu |
| 991 } // namespace webkit | 1032 } // namespace webkit |
| OLD | NEW |