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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 7129006: Make EstablishGpuChannel synchronous. Remove obsolete Synchronize msg. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix indentation and rebase Created 9 years, 6 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 | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/gpu_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index e3079643046973eeeda04b85014b6ff0f57f4a76..92dec65a013341eacdd099db9f58b50bea4b3d26 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -316,7 +316,6 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
DCHECK(CalledOnValidThread());
IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message)
IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished)
- IPC_MESSAGE_HANDLER(GpuHostMsg_SynchronizeReply, OnSynchronizeReply)
IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, OnCommandBufferCreated)
IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, OnDestroyCommandBuffer)
IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected,
@@ -358,17 +357,6 @@ void GpuProcessHost::EstablishGpuChannel(
}
}
-void GpuProcessHost::Synchronize(SynchronizeCallback* callback) {
- DCHECK(CalledOnValidThread());
- linked_ptr<SynchronizeCallback> wrapped_callback(callback);
-
- if (Send(new GpuMsg_Synchronize())) {
- synchronize_requests_.push(wrapped_callback);
- } else {
- SynchronizeError(wrapped_callback.release());
- }
-}
-
void GpuProcessHost::CreateViewCommandBuffer(
gfx::PluginWindowHandle compositing_surface,
int32 render_view_id,
@@ -435,15 +423,6 @@ void GpuProcessHost::OnChannelEstablished(
channel_handle, gpu_process_, GpuDataManager::GetInstance()->gpu_info());
}
-void GpuProcessHost::OnSynchronizeReply() {
- // Guard against race conditions in abrupt GPU process termination.
- if (!synchronize_requests_.empty()) {
- linked_ptr<SynchronizeCallback> callback(synchronize_requests_.front());
- synchronize_requests_.pop();
- callback->Run();
- }
-}
-
void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) {
if (!create_command_buffer_requests_.empty()) {
linked_ptr<CreateCommandBufferCallback> callback =
@@ -592,13 +571,6 @@ void GpuProcessHost::SendOutstandingReplies() {
base::kNullProcessHandle,
GPUInfo());
}
-
- // Now unblock all renderers waiting for synchronization replies.
- while (!synchronize_requests_.empty()) {
- linked_ptr<SynchronizeCallback> callback = synchronize_requests_.front();
- synchronize_requests_.pop();
- SynchronizeError(callback.release());
- }
}
void GpuProcessHost::EstablishChannelError(
@@ -616,8 +588,3 @@ void GpuProcessHost::CreateCommandBufferError(
wrapped_callback(callback);
callback->Run(route_id);
}
-
-void GpuProcessHost::SynchronizeError(SynchronizeCallback* callback) {
- scoped_ptr<SynchronizeCallback> wrapped_callback(callback);
- wrapped_callback->Run();
-}
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/gpu_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698