Chromium Code Reviews| Index: gpu/command_buffer/service/context_state.h |
| diff --git a/gpu/command_buffer/service/context_state.h b/gpu/command_buffer/service/context_state.h |
| index 32bef4cea3ec3f9099eb087b40090f22f2ec41bb..a4a8eda250d4e105f46e9ca7ed1e716a2d12d654 100644 |
| --- a/gpu/command_buffer/service/context_state.h |
| +++ b/gpu/command_buffer/service/context_state.h |
| @@ -102,13 +102,23 @@ struct GPU_EXPORT TextureUnit { |
| }; |
| struct Vec4 { |
| + enum DataType { |
| + kFloat, |
| + kInt, |
| + kUInt, |
| + }; |
| + |
| Vec4() { |
| v[0] = 0.0f; |
| v[1] = 0.0f; |
| v[2] = 0.0f; |
| v[3] = 1.0f; |
| + type = kFloat; |
| } |
| + // Use double type here so when storing data of type GLfloat, GLint, |
| + // or GLuint, there will be no data loss. |
| float v[4]; |
| + DataType type; |
|
Zhenyao Mo
2015/05/12 23:57:45
Note that in this CL, we don't hook up the setting
|
| }; |
| struct GPU_EXPORT ContextState { |