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

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: 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
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..6ab7994ed981a4cc980d13de0c8bc8db2d0603b2 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.
piman 2014/07/11 23:20:09 Really, we should assert and fix it upstream
+ callback.Run(CREATE_CMDBUF_FAILED_AND_CHANNEL_LOST);
}
}
@@ -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(succeeded ? CREATE_CMDBUF_SUCCEEDED : CREATE_CMDBUF_FAILED);
piman 2014/07/11 23:20:09 ideally we'd pass a CreateCommandBufferResult back
Ken Russell (switch to Gerrit) 2014/07/12 00:44:52 Thanks, that sounds cleaner. I've implemented this
}
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_CMDBUF_FAILED_AND_CHANNEL_LOST);
}
}

Powered by Google App Engine
This is Rietveld 408576698