| 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 10029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10040 if (index >= group_->max_vertex_attribs()) { | 10040 if (index >= group_->max_vertex_attribs()) { |
| 10041 LOCAL_SET_GL_ERROR( | 10041 LOCAL_SET_GL_ERROR( |
| 10042 GL_INVALID_VALUE, | 10042 GL_INVALID_VALUE, |
| 10043 "glVertexAttribDivisorANGLE", "index out of range"); | 10043 "glVertexAttribDivisorANGLE", "index out of range"); |
| 10044 return error::kNoError; | 10044 return error::kNoError; |
| 10045 } | 10045 } |
| 10046 | 10046 |
| 10047 state_.vertex_attrib_manager->SetDivisor( | 10047 state_.vertex_attrib_manager->SetDivisor( |
| 10048 index, | 10048 index, |
| 10049 divisor); | 10049 divisor); |
| 10050 if (state_.current_program.get()) { |
| 10051 state_.current_program->SaveAttribDivisor(index, divisor); |
| 10052 } |
| 10050 glVertexAttribDivisorANGLE(index, divisor); | 10053 glVertexAttribDivisorANGLE(index, divisor); |
| 10051 return error::kNoError; | 10054 return error::kNoError; |
| 10052 } | 10055 } |
| 10053 | 10056 |
| 10054 template <typename pixel_data_type> | 10057 template <typename pixel_data_type> |
| 10055 static void WriteAlphaData(void* pixels, | 10058 static void WriteAlphaData(void* pixels, |
| 10056 uint32_t row_count, | 10059 uint32_t row_count, |
| 10057 uint32_t channel_count, | 10060 uint32_t channel_count, |
| 10058 uint32_t alpha_channel_index, | 10061 uint32_t alpha_channel_index, |
| 10059 uint32_t unpadded_row_size, | 10062 uint32_t unpadded_row_size, |
| (...skipping 7046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17106 } | 17109 } |
| 17107 | 17110 |
| 17108 // Include the auto-generated part of this file. We split this because it means | 17111 // Include the auto-generated part of this file. We split this because it means |
| 17109 // we can easily edit the non-auto generated parts right here in this file | 17112 // we can easily edit the non-auto generated parts right here in this file |
| 17110 // instead of having to edit some template or the code generator. | 17113 // instead of having to edit some template or the code generator. |
| 17111 #include "base/macros.h" | 17114 #include "base/macros.h" |
| 17112 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17115 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 17113 | 17116 |
| 17114 } // namespace gles2 | 17117 } // namespace gles2 |
| 17115 } // namespace gpu | 17118 } // namespace gpu |
| OLD | NEW |