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

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

Issue 383303004: Added more detailed result codes for CreateViewCommandBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deleted commented-out code from test. Created 6 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 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 ad709972b18da004951e06a9f27ffb2321944633..578bde432b0cd3e6a80bd84720d793bbccea358d 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -646,7 +646,9 @@ void GpuProcessHost::CreateViewCommandBuffer(
surface_refs_.insert(std::make_pair(surface_id,
GpuSurfaceTracker::GetInstance()->GetSurfaceRefForSurface(surface_id)));
} else {
- callback.Run(false);
+ // Could distinguish here between compositing_surface being NULL
+ // and Send failing, if desired.
+ callback.Run(CREATE_COMMAND_BUFFER_FAILED_AND_CHANNEL_LOST);
}
}
@@ -745,7 +747,7 @@ void GpuProcessHost::OnChannelEstablished(
GpuDataManagerImpl::GetInstance()->GetGPUInfo());
}
-void GpuProcessHost::OnCommandBufferCreated(bool succeeded) {
+void GpuProcessHost::OnCommandBufferCreated(CreateCommandBufferResult result) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnCommandBufferCreated");
if (create_command_buffer_requests_.empty())
@@ -754,7 +756,7 @@ void GpuProcessHost::OnCommandBufferCreated(bool succeeded) {
CreateCommandBufferCallback callback =
create_command_buffer_requests_.front();
create_command_buffer_requests_.pop();
- callback.Run(succeeded);
+ callback.Run(result);
}
void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) {
@@ -1061,7 +1063,7 @@ void GpuProcessHost::SendOutstandingReplies() {
CreateCommandBufferCallback callback =
create_command_buffer_requests_.front();
create_command_buffer_requests_.pop();
- callback.Run(false);
+ callback.Run(CREATE_COMMAND_BUFFER_FAILED_AND_CHANNEL_LOST);
}
}
« 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