OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3096 break; | 3096 break; |
3097 } | 3097 } |
3098 } | 3098 } |
3099 | 3099 |
3100 if (!supported) { | 3100 if (!supported) { |
3101 Destroy(true); | 3101 Destroy(true); |
3102 return false; | 3102 return false; |
3103 } | 3103 } |
3104 } | 3104 } |
3105 | 3105 |
3106 bool needs_emulation = gl_version_info().IsLowerThanGL(4, 2); | 3106 // |needs_emulation| is set to true on Desktop GL 4.1 or lower. |
3107 // For now we set it everywhere to be on the safe side in case drivers | |
3108 // do not handle out-of-bounds visit securely. | |
Ken Russell (switch to Gerrit)
2016/10/24 21:39:24
How about "visit" -> "accesses"?
Zhenyao Mo
2016/10/24 21:47:30
Done.
| |
3109 bool needs_emulation = true; | |
3107 transform_feedback_manager_.reset(new TransformFeedbackManager( | 3110 transform_feedback_manager_.reset(new TransformFeedbackManager( |
3108 group_->max_transform_feedback_separate_attribs(), needs_emulation)); | 3111 group_->max_transform_feedback_separate_attribs(), needs_emulation)); |
3109 | 3112 |
3110 if (feature_info_->IsWebGL2OrES3Context()) { | 3113 if (feature_info_->IsWebGL2OrES3Context()) { |
3111 if (!feature_info_->IsES3Capable()) { | 3114 if (!feature_info_->IsES3Capable()) { |
3112 LOG(ERROR) << "Underlying driver does not support ES3."; | 3115 LOG(ERROR) << "Underlying driver does not support ES3."; |
3113 Destroy(true); | 3116 Destroy(true); |
3114 return false; | 3117 return false; |
3115 } | 3118 } |
3116 feature_info_->EnableES3Validators(); | 3119 feature_info_->EnableES3Validators(); |
(...skipping 15548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
18665 } | 18668 } |
18666 | 18669 |
18667 // Include the auto-generated part of this file. We split this because it means | 18670 // Include the auto-generated part of this file. We split this because it means |
18668 // we can easily edit the non-auto generated parts right here in this file | 18671 // we can easily edit the non-auto generated parts right here in this file |
18669 // instead of having to edit some template or the code generator. | 18672 // instead of having to edit some template or the code generator. |
18670 #include "base/macros.h" | 18673 #include "base/macros.h" |
18671 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18674 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
18672 | 18675 |
18673 } // namespace gles2 | 18676 } // namespace gles2 |
18674 } // namespace gpu | 18677 } // namespace gpu |
OLD | NEW |