Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 10782005: Add a shallow command buffer flush that doesn't glFlush (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes a test failure Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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();
944 }
945
942 DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbuffer, 946 DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbuffer,
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
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698