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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 561012: Change the GLES2Implementation Flush and Finish functions... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
===================================================================
--- gpu/command_buffer/client/gles2_implementation.cc (revision 37766)
+++ gpu/command_buffer/client/gles2_implementation.cc (working copy)
@@ -60,8 +60,7 @@
}
void GLES2Implementation::WaitForCmd() {
- int32 token = helper_->InsertToken();
- helper_->WaitForToken(token);
+ helper_->CommandBufferHelper::Finish();
}
void GLES2Implementation::DrawElements(
@@ -69,14 +68,26 @@
helper_->DrawElements(mode, count, type, ToGLuint(indices));
}
+void GLES2Implementation::Flush() {
+ // Insert the cmd to call glFlush
+ helper_->Flush();
+ // Flush our command buffer
+ // (tell the service to execute upto the flush cmd.)
+ helper_->CommandBufferHelper::Flush();
+}
+
void GLES2Implementation::Finish() {
+ // Insert the cmd to call glFinish
helper_->Finish();
- WaitForCmd();
+ // Flinish our command buffer
+ // (tell the service to execute upto the Finish cmd and wait for it to
+ // execute.)
+ helper_->CommandBufferHelper::Finish();
}
void GLES2Implementation::SwapBuffers() {
helper_->SwapBuffers();
- Finish();
+ Flush();
}
void GLES2Implementation::GetVertexAttribPointerv(
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698