| 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 5110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5121 *static_cast<const volatile gles2::cmds::OverlayPromotionHintCHROMIUM*>( | 5121 *static_cast<const volatile gles2::cmds::OverlayPromotionHintCHROMIUM*>( |
| 5122 cmd_data); | 5122 cmd_data); |
| 5123 GLuint texture = c.texture; | 5123 GLuint texture = c.texture; |
| 5124 GLboolean promotion_hint = static_cast<GLboolean>(c.promotion_hint); | 5124 GLboolean promotion_hint = static_cast<GLboolean>(c.promotion_hint); |
| 5125 GLint display_x = static_cast<GLint>(c.display_x); | 5125 GLint display_x = static_cast<GLint>(c.display_x); |
| 5126 GLint display_y = static_cast<GLint>(c.display_y); | 5126 GLint display_y = static_cast<GLint>(c.display_y); |
| 5127 DoOverlayPromotionHintCHROMIUM(texture, promotion_hint, display_x, display_y); | 5127 DoOverlayPromotionHintCHROMIUM(texture, promotion_hint, display_x, display_y); |
| 5128 return error::kNoError; | 5128 return error::kNoError; |
| 5129 } | 5129 } |
| 5130 | 5130 |
| 5131 error::Error GLES2DecoderImpl::HandleSwapBuffersWithBoundsCHROMIUMImmediate( |
| 5132 uint32_t immediate_data_size, |
| 5133 const volatile void* cmd_data) { |
| 5134 const volatile gles2::cmds::SwapBuffersWithBoundsCHROMIUMImmediate& c = |
| 5135 *static_cast< |
| 5136 const volatile gles2::cmds::SwapBuffersWithBoundsCHROMIUMImmediate*>( |
| 5137 cmd_data); |
| 5138 GLsizei count = static_cast<GLsizei>(c.count); |
| 5139 uint32_t data_size = 0; |
| 5140 if (count >= 0 && |
| 5141 !GLES2Util::ComputeDataSize(count, sizeof(GLint), 4, &data_size)) { |
| 5142 return error::kOutOfBounds; |
| 5143 } |
| 5144 if (data_size > immediate_data_size) { |
| 5145 return error::kOutOfBounds; |
| 5146 } |
| 5147 volatile const GLint* rects = GetImmediateDataAs<volatile const GLint*>( |
| 5148 c, data_size, immediate_data_size); |
| 5149 if (count < 0) { |
| 5150 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glSwapBuffersWithBoundsCHROMIUM", |
| 5151 "count < 0"); |
| 5152 return error::kNoError; |
| 5153 } |
| 5154 if (rects == NULL) { |
| 5155 return error::kOutOfBounds; |
| 5156 } |
| 5157 DoSwapBuffersWithBoundsCHROMIUM(count, rects); |
| 5158 return error::kNoError; |
| 5159 } |
| 5160 |
| 5131 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { | 5161 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { |
| 5132 switch (cap) { | 5162 switch (cap) { |
| 5133 case GL_BLEND: | 5163 case GL_BLEND: |
| 5134 state_.enable_flags.blend = enabled; | 5164 state_.enable_flags.blend = enabled; |
| 5135 if (state_.enable_flags.cached_blend != enabled || | 5165 if (state_.enable_flags.cached_blend != enabled || |
| 5136 state_.ignore_cached_state) { | 5166 state_.ignore_cached_state) { |
| 5137 state_.enable_flags.cached_blend = enabled; | 5167 state_.enable_flags.cached_blend = enabled; |
| 5138 return true; | 5168 return true; |
| 5139 } | 5169 } |
| 5140 return false; | 5170 return false; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5239 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; | 5269 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; |
| 5240 return true; | 5270 return true; |
| 5241 } | 5271 } |
| 5242 return false; | 5272 return false; |
| 5243 default: | 5273 default: |
| 5244 NOTREACHED(); | 5274 NOTREACHED(); |
| 5245 return false; | 5275 return false; |
| 5246 } | 5276 } |
| 5247 } | 5277 } |
| 5248 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5278 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| OLD | NEW |