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

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 7253052: Execute all GL commands up to the put offset reported by a flush. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" 7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 if (!context_->GetChildToParentLatch(latch_id)) { 365 if (!context_->GetChildToParentLatch(latch_id)) {
366 LOG(ERROR) << "getLatch must only be called on child context"; 366 LOG(ERROR) << "getLatch must only be called on child context";
367 synthesizeGLError(GL_INVALID_OPERATION); 367 synthesizeGLError(GL_INVALID_OPERATION);
368 *latch_id = gpu::kInvalidLatchId; 368 *latch_id = gpu::kInvalidLatchId;
369 } 369 }
370 } 370 }
371 371
372 void WebGraphicsContext3DCommandBufferImpl::waitLatchCHROMIUM( 372 void WebGraphicsContext3DCommandBufferImpl::waitLatchCHROMIUM(
373 WGC3Duint latch_id) 373 WGC3Duint latch_id)
374 { 374 {
375 TRACE_EVENT1("gpu", "WebGfxCtx3DCmdBfrImpl::WaitLatch", "latch_id", latch_id);
376 gl_->WaitLatchCHROMIUM(latch_id);
377 } 375 }
378 376
379 void WebGraphicsContext3DCommandBufferImpl::setLatchCHROMIUM( 377 void WebGraphicsContext3DCommandBufferImpl::setLatchCHROMIUM(
380 WGC3Duint latch_id) 378 WGC3Duint latch_id)
381 { 379 {
382 TRACE_EVENT1("gpu", "WebGfxCtx3DCmdBfrImpl::SetLatch", "latch_id", latch_id);
383 gl_->SetLatchCHROMIUM(latch_id);
384 // required to ensure set command is sent to GPU process
385 gl_->Flush();
386 } 380 }
387 381
388 void WebGraphicsContext3DCommandBufferImpl:: 382 void WebGraphicsContext3DCommandBufferImpl::
389 rateLimitOffscreenContextCHROMIUM() { 383 rateLimitOffscreenContextCHROMIUM() {
390 gl_->RateLimitOffscreenContextCHROMIUM(); 384 gl_->RateLimitOffscreenContextCHROMIUM();
391 } 385 }
392 386
393 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: 387 WebKit::WebString WebGraphicsContext3DCommandBufferImpl::
394 getRequestableExtensionsCHROMIUM() { 388 getRequestableExtensionsCHROMIUM() {
395 return WebKit::WebString::fromUTF8( 389 return WebKit::WebString::fromUTF8(
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 context_lost_callback_->onContextLost(); 1061 context_lost_callback_->onContextLost();
1068 } 1062 }
1069 1063
1070 RenderView* renderview = 1064 RenderView* renderview =
1071 web_view_ ? RenderView::FromWebView(web_view_) : NULL; 1065 web_view_ ? RenderView::FromWebView(web_view_) : NULL;
1072 if (renderview) 1066 if (renderview)
1073 renderview->OnViewContextSwapBuffersAborted(); 1067 renderview->OnViewContextSwapBuffersAborted();
1074 } 1068 }
1075 1069
1076 #endif // defined(ENABLE_GPU) 1070 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/renderer/gpu/command_buffer_proxy.cc ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698