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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 gl_->DeleteQueriesEXT(1, &query); | 802 gl_->DeleteQueriesEXT(1, &query); |
803 } | 803 } |
804 | 804 |
805 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) | 805 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) |
806 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) | 806 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) |
807 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) | 807 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) |
808 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) | 808 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) |
809 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, | 809 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, |
810 WebGLId, WGC3Denum, WGC3Duint*) | 810 WebGLId, WGC3Denum, WGC3Duint*) |
811 | 811 |
812 DELEGATE_TO_GL_6(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, | 812 void WebGraphicsContext3DImpl::copyTextureCHROMIUM(WGC3Denum target, |
813 WebGLId, WebGLId, WGC3Dint, WGC3Denum, WGC3Denum); | 813 WebGLId source_id, |
| 814 WebGLId dest_id, |
| 815 WGC3Dint level, |
| 816 WGC3Denum internal_format, |
| 817 WGC3Denum dest_type) { |
| 818 copyTextureCHROMIUM(target, source_id, dest_id, internal_format, dest_type); |
| 819 } |
| 820 |
| 821 void WebGraphicsContext3DImpl::copySubTextureCHROMIUM(WGC3Denum target, |
| 822 WebGLId source_id, |
| 823 WebGLId dest_id, |
| 824 WGC3Dint level, |
| 825 WGC3Dint xoffset, |
| 826 WGC3Dint yoffset) { |
| 827 copySubTextureCHROMIUM(target, source_id, dest_id, xoffset, yoffset); |
| 828 } |
| 829 |
| 830 DELEGATE_TO_GL_5(copyTextureCHROMIUM, |
| 831 CopyTextureCHROMIUM, |
| 832 WGC3Denum, |
| 833 WebGLId, |
| 834 WebGLId, |
| 835 WGC3Denum, |
| 836 WGC3Denum); |
| 837 |
| 838 DELEGATE_TO_GL_5(copySubTextureCHROMIUM, |
| 839 CopySubTextureCHROMIUM, |
| 840 WGC3Denum, |
| 841 WebGLId, |
| 842 WebGLId, |
| 843 WGC3Dint, |
| 844 WGC3Dint); |
814 | 845 |
815 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, | 846 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, |
816 WebGLId, WGC3Dint, const WGC3Dchar*) | 847 WebGLId, WGC3Dint, const WGC3Dchar*) |
817 | 848 |
818 void WebGraphicsContext3DImpl::shallowFlushCHROMIUM() { | 849 void WebGraphicsContext3DImpl::shallowFlushCHROMIUM() { |
819 flush_id_ = GenFlushID(); | 850 flush_id_ = GenFlushID(); |
820 gl_->ShallowFlushCHROMIUM(); | 851 gl_->ShallowFlushCHROMIUM(); |
821 } | 852 } |
822 | 853 |
823 void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() { | 854 void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() { |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 const blink::WebGraphicsContext3D::Attributes& attributes, | 1207 const blink::WebGraphicsContext3D::Attributes& attributes, |
1177 ::gpu::gles2::ContextCreationAttribHelper* output_attribs) { | 1208 ::gpu::gles2::ContextCreationAttribHelper* output_attribs) { |
1178 output_attribs->alpha_size = attributes.alpha ? 8 : 0; | 1209 output_attribs->alpha_size = attributes.alpha ? 8 : 0; |
1179 output_attribs->depth_size = attributes.depth ? 24 : 0; | 1210 output_attribs->depth_size = attributes.depth ? 24 : 0; |
1180 output_attribs->stencil_size = attributes.stencil ? 8 : 0; | 1211 output_attribs->stencil_size = attributes.stencil ? 8 : 0; |
1181 output_attribs->samples = attributes.antialias ? 4 : 0; | 1212 output_attribs->samples = attributes.antialias ? 4 : 0; |
1182 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1213 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
1183 output_attribs->fail_if_major_perf_caveat = | 1214 output_attribs->fail_if_major_perf_caveat = |
1184 attributes.failIfMajorPerformanceCaveat; | 1215 attributes.failIfMajorPerformanceCaveat; |
1185 output_attribs->bind_generates_resource = false; | 1216 output_attribs->bind_generates_resource = false; |
| 1217 output_attribs->es3_context_required = |
| 1218 (attributes.webGL && attributes.webGLVersion == 2); |
1186 } | 1219 } |
1187 | 1220 |
1188 } // namespace gpu_blink | 1221 } // namespace gpu_blink |
OLD | NEW |