Clean up some of the shader compilation code.

This cL contains some micro optimizations as well as cleaning up some
variables that are left over from old refactors.

One variable in particular that was deleted is the "compiler_options_"
member within the Shader class. This member was used to hold extra
compiler options such as extensions for cache key purposes. However,
at some point this mechanism has been replaced by querying the angle
compiler directly for a string which represents the resources.

BUG=453543
TEST=trybots

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

Cr-Commit-Position: refs/heads/master@{#314642}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index f37c61a4..9ad2677 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -7051,14 +7051,17 @@
     GLuint client_id, GLsizei count, const char** data, const GLint* length) {
   std::string str;
   for (GLsizei ii = 0; ii < count; ++ii) {
-    str.append(data[ii]);
+    if (length && length[ii] > 0)
+      str.append(data[ii], length[ii]);
+    else
+      str.append(data[ii]);
   }
   Shader* shader = GetShaderInfoNotProgram(client_id, "glShaderSource");
   if (!shader) {
     return;
   }
   // Note: We don't actually call glShaderSource here. We wait until
-  // the call to glCompileShader.
+  // we actually compile the shader.
   shader->set_source(str);
 }