diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 01:17:00 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 01:17:00 +0000 |
commit | 22f320a27d8b7e45221fd92ce1964716a7277821 (patch) | |
tree | d11cd935d327658829a199d9e1c59a6aa7d3f73f /content/renderer/gpu/renderer_gl_context.cc | |
parent | c16ed34dad105cd5e8a1f0215f3650cf31507bc6 (diff) | |
download | chromium_src-22f320a27d8b7e45221fd92ce1964716a7277821.zip chromium_src-22f320a27d8b7e45221fd92ce1964716a7277821.tar.gz chromium_src-22f320a27d8b7e45221fd92ce1964716a7277821.tar.bz2 |
Added GPU process "echo" IPC message.
The echo message is essentially an async fence with event based notification. The client gets a notification when the GPU process has completed all the work up to the last flush.
I used it to replace the SwapBuffers / OnSwapBuffers synchronization and got rid of some of the callbacks in the lower layers of the stack.
The SwapBuffers callbacks in the GPU process are only needed on mac now and I will replace them with something more generic soon.
Review URL: http://codereview.chromium.org/7762013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/gpu/renderer_gl_context.cc')
-rw-r--r-- | content/renderer/gpu/renderer_gl_context.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/content/renderer/gpu/renderer_gl_context.cc b/content/renderer/gpu/renderer_gl_context.cc index b9cea16..6320c80b 100644 --- a/content/renderer/gpu/renderer_gl_context.cc +++ b/content/renderer/gpu/renderer_gl_context.cc @@ -192,10 +192,6 @@ void RendererGLContext::DeleteParentTexture(uint32 texture) { gles2_implementation_->DeleteTextures(1, &texture); } -void RendererGLContext::SetSwapBuffersCallback(Callback0::Type* callback) { - swap_buffers_callback_.reset(callback); -} - void RendererGLContext::SetContextLostCallback( Callback1<ContextLostReason>::Type* callback) { context_lost_callback_.reset(callback); @@ -229,9 +225,14 @@ bool RendererGLContext::SwapBuffers() { return false; gles2_implementation_->SwapBuffers(); + return true; } +bool RendererGLContext::Echo(Task* task) { + return command_buffer_->Echo(task); +} + scoped_refptr<TransportTextureHost> RendererGLContext::CreateTransportTextureHost() { return channel_->transport_texture_service()->CreateTransportTextureHost( @@ -368,9 +369,6 @@ bool RendererGLContext::Initialize(bool onscreen, } } - command_buffer_->SetSwapBuffersCallback( - NewCallback(this, &RendererGLContext::OnSwapBuffers)); - command_buffer_->SetChannelErrorCallback( NewCallback(this, &RendererGLContext::OnContextLost)); @@ -445,11 +443,6 @@ void RendererGLContext::Destroy() { channel_ = NULL; } -void RendererGLContext::OnSwapBuffers() { - if (swap_buffers_callback_.get()) - swap_buffers_callback_->Run(); -} - void RendererGLContext::OnContextLost() { if (context_lost_callback_.get()) { RendererGLContext::ContextLostReason reason = kUnknown; |