OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 4995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5006 cmd_data); | 5006 cmd_data); |
5007 (void)c; | 5007 (void)c; |
5008 if (!features().chromium_screen_space_antialiasing) { | 5008 if (!features().chromium_screen_space_antialiasing) { |
5009 return error::kUnknownCommand; | 5009 return error::kUnknownCommand; |
5010 } | 5010 } |
5011 | 5011 |
5012 DoApplyScreenSpaceAntialiasingCHROMIUM(); | 5012 DoApplyScreenSpaceAntialiasingCHROMIUM(); |
5013 return error::kNoError; | 5013 return error::kNoError; |
5014 } | 5014 } |
5015 | 5015 |
| 5016 error::Error |
| 5017 GLES2DecoderImpl::HandleUniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate( |
| 5018 uint32_t immediate_data_size, |
| 5019 const void* cmd_data) { |
| 5020 const gles2::cmds::UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate& c = |
| 5021 *static_cast<const gles2::cmds:: |
| 5022 UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate*>( |
| 5023 cmd_data); |
| 5024 (void)c; |
| 5025 GLint location = static_cast<GLint>(c.location); |
| 5026 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 5027 uint32_t data_size; |
| 5028 if (!ComputeDataSize(1, sizeof(GLfloat), 16, &data_size)) { |
| 5029 return error::kOutOfBounds; |
| 5030 } |
| 5031 if (data_size > immediate_data_size) { |
| 5032 return error::kOutOfBounds; |
| 5033 } |
| 5034 const GLfloat* default_value = |
| 5035 GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); |
| 5036 if (default_value == NULL) { |
| 5037 return error::kOutOfBounds; |
| 5038 } |
| 5039 DoUniformMatrix4fvStreamTextureMatrixCHROMIUM(location, transpose, |
| 5040 default_value); |
| 5041 return error::kNoError; |
| 5042 } |
| 5043 |
5016 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { | 5044 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { |
5017 switch (cap) { | 5045 switch (cap) { |
5018 case GL_BLEND: | 5046 case GL_BLEND: |
5019 state_.enable_flags.blend = enabled; | 5047 state_.enable_flags.blend = enabled; |
5020 if (state_.enable_flags.cached_blend != enabled || | 5048 if (state_.enable_flags.cached_blend != enabled || |
5021 state_.ignore_cached_state) { | 5049 state_.ignore_cached_state) { |
5022 state_.enable_flags.cached_blend = enabled; | 5050 state_.enable_flags.cached_blend = enabled; |
5023 return true; | 5051 return true; |
5024 } | 5052 } |
5025 return false; | 5053 return false; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5116 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; | 5144 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; |
5117 return true; | 5145 return true; |
5118 } | 5146 } |
5119 return false; | 5147 return false; |
5120 default: | 5148 default: |
5121 NOTREACHED(); | 5149 NOTREACHED(); |
5122 return false; | 5150 return false; |
5123 } | 5151 } |
5124 } | 5152 } |
5125 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5153 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |