Set correct errors when transfer buffer creation fails.

When the Transfer Buffer creation has failed, we need to set the error
correctly if the command buffer can truly never be used again. This
way when callees check for errors they see that.

Not all errors should be logged as a global error though so we need
to be careful which ones we set. For example in cases where we know
the context has been lost we should set the context to be lost. However
some memory errors we may not want to set an error, it could just be
the size was too large for the requested transfer buffer for example.

[email protected]
BUG=467678

Review URL: https://codereview.chromium.org/1267873002

Cr-Commit-Position: refs/heads/master@{#341663}
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc
index cddc62a..b6306d7 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper.cc
@@ -102,6 +102,7 @@
       command_buffer_->CreateTransferBuffer(ring_buffer_size_, &id);
   if (id < 0) {
     ClearUsable();
+    DCHECK(error::IsError(command_buffer()->GetLastError()));
     return false;
   }