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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
6 | 6 |
7 #include "third_party/khronos/GLES2/gl2.h" | 7 #include "third_party/khronos/GLES2/gl2.h" |
8 #ifndef GL_GLEXT_PROTOTYPES | 8 #ifndef GL_GLEXT_PROTOTYPES |
9 #define GL_GLEXT_PROTOTYPES 1 | 9 #define GL_GLEXT_PROTOTYPES 1 |
10 #endif | 10 #endif |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
932 if (!visible_ && free_command_buffer_when_invisible_) | 932 if (!visible_ && free_command_buffer_when_invisible_) |
933 gl_->FreeEverything(); | 933 gl_->FreeEverything(); |
934 } | 934 } |
935 | 935 |
936 void WebGraphicsContext3DCommandBufferImpl::flush() { | 936 void WebGraphicsContext3DCommandBufferImpl::flush() { |
937 gl_->Flush(); | 937 gl_->Flush(); |
938 if (!visible_ && free_command_buffer_when_invisible_) | 938 if (!visible_ && free_command_buffer_when_invisible_) |
939 gl_->FreeEverything(); | 939 gl_->FreeEverything(); |
940 } | 940 } |
941 | 941 |
942 void WebGraphicsContext3DCommandBufferImpl::shallowFlushCHROMIUM() { | |
943 gl_->ShallowFlushCHROMIUM(); | |
nduca
2012/07/18 06:13:06
Was there a reason you couldn't say gl_->helper()-
brianderson
2012/07/19 03:29:44
In each of the wgc3d implementations I copied the
| |
944 } | |
945 | |
942 DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbuffer, | 946 DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbuffer, |
nduca
2012/07/18 06:13:06
Who is advertising the extension as being supporte
brianderson
2012/07/19 03:29:44
It is advertised with other client-side-only exten
| |
943 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId) | 947 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId) |
944 | 948 |
945 DELEGATE_TO_GL_5(framebufferTexture2D, FramebufferTexture2D, | 949 DELEGATE_TO_GL_5(framebufferTexture2D, FramebufferTexture2D, |
946 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint) | 950 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint) |
947 | 951 |
948 DELEGATE_TO_GL_1(frontFace, FrontFace, WGC3Denum) | 952 DELEGATE_TO_GL_1(frontFace, FrontFace, WGC3Denum) |
949 | 953 |
950 DELEGATE_TO_GL_1(generateMipmap, GenerateMipmap, WGC3Denum) | 954 DELEGATE_TO_GL_1(generateMipmap, GenerateMipmap, WGC3Denum) |
951 | 955 |
952 bool WebGraphicsContext3DCommandBufferImpl::getActiveAttrib( | 956 bool WebGraphicsContext3DCommandBufferImpl::getActiveAttrib( |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1560 swap_client_->OnViewContextSwapBuffersAborted(); | 1564 swap_client_->OnViewContextSwapBuffersAborted(); |
1561 } | 1565 } |
1562 | 1566 |
1563 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1567 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1564 const std::string& message, int id) { | 1568 const std::string& message, int id) { |
1565 if (error_message_callback_) { | 1569 if (error_message_callback_) { |
1566 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1570 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1567 error_message_callback_->onErrorMessage(str, id); | 1571 error_message_callback_->onErrorMessage(str, id); |
1568 } | 1572 } |
1569 } | 1573 } |
OLD | NEW |