| 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/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 case GL_TEXTURE_MAG_FILTER: | 1209 case GL_TEXTURE_MAG_FILTER: |
| 1210 case GL_TEXTURE_WRAP_R: | 1210 case GL_TEXTURE_WRAP_R: |
| 1211 case GL_TEXTURE_WRAP_S: | 1211 case GL_TEXTURE_WRAP_S: |
| 1212 case GL_TEXTURE_WRAP_T: | 1212 case GL_TEXTURE_WRAP_T: |
| 1213 case GL_TEXTURE_COMPARE_FUNC: | 1213 case GL_TEXTURE_COMPARE_FUNC: |
| 1214 case GL_TEXTURE_COMPARE_MODE: | 1214 case GL_TEXTURE_COMPARE_MODE: |
| 1215 case GL_TEXTURE_BASE_LEVEL: | 1215 case GL_TEXTURE_BASE_LEVEL: |
| 1216 case GL_TEXTURE_MAX_LEVEL: | 1216 case GL_TEXTURE_MAX_LEVEL: |
| 1217 case GL_TEXTURE_USAGE_ANGLE: | 1217 case GL_TEXTURE_USAGE_ANGLE: |
| 1218 { | 1218 { |
| 1219 GLint iparam = static_cast<GLint>(param); | 1219 GLint iparam = static_cast<GLint>(std::round(param)); |
| 1220 return SetParameteri(feature_info, pname, iparam); | 1220 return SetParameteri(feature_info, pname, iparam); |
| 1221 } | 1221 } |
| 1222 case GL_TEXTURE_MIN_LOD: | 1222 case GL_TEXTURE_MIN_LOD: |
| 1223 sampler_state_.min_lod = param; | 1223 sampler_state_.min_lod = param; |
| 1224 break; | 1224 break; |
| 1225 case GL_TEXTURE_MAX_LOD: | 1225 case GL_TEXTURE_MAX_LOD: |
| 1226 sampler_state_.max_lod = param; | 1226 sampler_state_.max_lod = param; |
| 1227 break; | 1227 break; |
| 1228 case GL_TEXTURE_MAX_ANISOTROPY_EXT: | 1228 case GL_TEXTURE_MAX_ANISOTROPY_EXT: |
| 1229 if (param < 1.f) { | 1229 if (param < 1.f) { |
| (...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3309 uint32_t TextureManager::GetServiceIdGeneration() const { | 3309 uint32_t TextureManager::GetServiceIdGeneration() const { |
| 3310 return current_service_id_generation_; | 3310 return current_service_id_generation_; |
| 3311 } | 3311 } |
| 3312 | 3312 |
| 3313 void TextureManager::IncrementServiceIdGeneration() { | 3313 void TextureManager::IncrementServiceIdGeneration() { |
| 3314 current_service_id_generation_++; | 3314 current_service_id_generation_++; |
| 3315 } | 3315 } |
| 3316 | 3316 |
| 3317 } // namespace gles2 | 3317 } // namespace gles2 |
| 3318 } // namespace gpu | 3318 } // namespace gpu |
| OLD | NEW |