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 void WebGraphicsContext3DImpl::copyTextureCHROMIUM(WGC3Denum target, | 812 DELEGATE_TO_GL_6(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, |
813 WebGLId source_id, | 813 WebGLId, WebGLId, WGC3Dint, WGC3Denum, WGC3Denum); |
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); | |
845 | 814 |
846 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, | 815 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, |
847 WebGLId, WGC3Dint, const WGC3Dchar*) | 816 WebGLId, WGC3Dint, const WGC3Dchar*) |
848 | 817 |
849 void WebGraphicsContext3DImpl::shallowFlushCHROMIUM() { | 818 void WebGraphicsContext3DImpl::shallowFlushCHROMIUM() { |
850 flush_id_ = GenFlushID(); | 819 flush_id_ = GenFlushID(); |
851 gl_->ShallowFlushCHROMIUM(); | 820 gl_->ShallowFlushCHROMIUM(); |
852 } | 821 } |
853 | 822 |
854 void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() { | 823 void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() { |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 output_attribs->depth_size = attributes.depth ? 24 : 0; | 1179 output_attribs->depth_size = attributes.depth ? 24 : 0; |
1211 output_attribs->stencil_size = attributes.stencil ? 8 : 0; | 1180 output_attribs->stencil_size = attributes.stencil ? 8 : 0; |
1212 output_attribs->samples = attributes.antialias ? 4 : 0; | 1181 output_attribs->samples = attributes.antialias ? 4 : 0; |
1213 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1182 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
1214 output_attribs->fail_if_major_perf_caveat = | 1183 output_attribs->fail_if_major_perf_caveat = |
1215 attributes.failIfMajorPerformanceCaveat; | 1184 attributes.failIfMajorPerformanceCaveat; |
1216 output_attribs->bind_generates_resource = false; | 1185 output_attribs->bind_generates_resource = false; |
1217 } | 1186 } |
1218 | 1187 |
1219 } // namespace gpu_blink | 1188 } // namespace gpu_blink |
OLD | NEW |