diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 23:30:22 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 23:30:22 +0000 |
commit | c76fe6734b1b5e4985828c634e582063b0267eb9 (patch) | |
tree | b447ac0e87aa8828b8664cbfa8195ae13821c918 /content/common | |
parent | b597d9b28154b9a6a707b483c4fdab7efa8e7c47 (diff) | |
download | chromium_src-c76fe6734b1b5e4985828c634e582063b0267eb9.zip chromium_src-c76fe6734b1b5e4985828c634e582063b0267eb9.tar.gz chromium_src-c76fe6734b1b5e4985828c634e582063b0267eb9.tar.bz2 |
Implicitly ensure backbuffer creation on draw
Instead of having a special IPC channel to ensure a backbuffer is allocated
for a given GL context, we can create it implicitly on the first draw attempt
into FBO 0. If this fails, the context is considered lost.
BUG=181120
Review URL: https://codereview.chromium.org/112303002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
5 files changed, 0 insertions, 31 deletions
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc index 3b299063..768b427 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.cc +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc @@ -448,13 +448,6 @@ void CommandBufferProxyImpl::Echo(const base::Closure& callback) { echo_tasks_.push(callback); } -bool CommandBufferProxyImpl::EnsureBackbuffer() { - if (last_state_.error != gpu::error::kNoError) - return false; - - return Send(new GpuCommandBufferMsg_EnsureBackbuffer(route_id_)); -} - uint32 CommandBufferProxyImpl::InsertSyncPoint() { if (last_state_.error != gpu::error::kNoError) return 0; diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 8fea7d5..90cb9b9 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -537,11 +537,6 @@ void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM( DELEGATE_TO_GL_3(discardFramebufferEXT, DiscardFramebufferEXT, WGC3Denum, WGC3Dsizei, const WGC3Denum*) -void WebGraphicsContext3DCommandBufferImpl::ensureBackbufferCHROMIUM() { - gl_->Flush(); - command_buffer_->EnsureBackbuffer(); -} - void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( WebGLId texture, WebGLId parentTexture) { NOTIMPLEMENTED(); diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h index 0dd4c1d..b5331eb 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h @@ -503,8 +503,6 @@ class WebGraphicsContext3DCommandBufferImpl virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachments, const WGC3Denum* attachments); - virtual void ensureBackbufferCHROMIUM(); - virtual void copyTextureToParentTextureCHROMIUM( WebGLId texture, WebGLId parentTexture); diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 4a1cbfd..44eaf90 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -213,8 +213,6 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { OnCreateVideoDecoder) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, OnSetSurfaceVisible) - IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_EnsureBackbuffer, - OnEnsureBackbuffer) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RetireSyncPoint, OnRetireSyncPoint) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncPoint, @@ -758,19 +756,6 @@ void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { memory_manager_client_state_->SetVisible(visible); } -void GpuCommandBufferStub::OnEnsureBackbuffer() { - TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEnsureBackbuffer"); - if (!surface_.get()) - return; - if (surface_->DeferDraws()) { - DCHECK(!IsScheduled()); - channel_->RequeueMessage(); - } else { - if (!surface_->SetBackbufferAllocation(true)) - channel_->DestroySoon(); - } -} - void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point) { sync_points_.push_back(sync_point); } diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h index 0ff3493..936a8a0 100644 --- a/content/common/gpu/gpu_messages.h +++ b/content/common/gpu/gpu_messages.h @@ -620,8 +620,6 @@ IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck) // Send to stub on surface visibility change. IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */) -IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EnsureBackbuffer) - // Sent to proxy when the gpu memory manager changes its memory allocation. IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetMemoryAllocation, gpu::MemoryAllocation /* allocation */) |