| Index: gpu/command_buffer/common/gles2_cmd_utils.cc
|
| diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
|
| index 6eb9b8e0827283f571e4fe4879ce80b9f9a90feb..129934bfa1f2c0cda1abc35c7165c5ee7dd275d6 100644
|
| --- a/gpu/command_buffer/common/gles2_cmd_utils.cc
|
| +++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
|
| @@ -1878,6 +1878,36 @@ bool IsWebGLContextType(ContextType context_type) {
|
| return false;
|
| }
|
|
|
| +bool IsWebGL1OrES2ContextType(ContextType context_type) {
|
| + // Switch statement to cause a compile-time error if we miss a case.
|
| + switch (context_type) {
|
| + case CONTEXT_TYPE_WEBGL1:
|
| + case CONTEXT_TYPE_OPENGLES2:
|
| + return true;
|
| + case CONTEXT_TYPE_WEBGL2:
|
| + case CONTEXT_TYPE_OPENGLES3:
|
| + return false;
|
| + }
|
| +
|
| + NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| +bool IsWebGL2OrES3ContextType(ContextType context_type) {
|
| + // Switch statement to cause a compile-time error if we miss a case.
|
| + switch (context_type) {
|
| + case CONTEXT_TYPE_OPENGLES3:
|
| + case CONTEXT_TYPE_WEBGL2:
|
| + return true;
|
| + case CONTEXT_TYPE_WEBGL1:
|
| + case CONTEXT_TYPE_OPENGLES2:
|
| + return false;
|
| + }
|
| +
|
| + NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| ContextCreationAttribHelper::ContextCreationAttribHelper()
|
| : gpu_preference(gl::PreferIntegratedGpu),
|
| alpha_size(-1),
|
|
|