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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 return GL_NONE; | 309 return GL_NONE; |
310 } | 310 } |
311 } | 311 } |
312 | 312 |
313 bool SizedFormatAvailable(const FeatureInfo* feature_info, | 313 bool SizedFormatAvailable(const FeatureInfo* feature_info, |
314 bool immutable, | 314 bool immutable, |
315 GLenum internal_format) { | 315 GLenum internal_format) { |
316 if (immutable) | 316 if (immutable) |
317 return true; | 317 return true; |
318 | 318 |
| 319 if ((feature_info->feature_flags().chromium_image_ycbcr_420v && |
| 320 internal_format == GL_RGB_YCBCR_420V_CHROMIUM) || |
| 321 (feature_info->feature_flags().chromium_image_ycbcr_422 && |
| 322 internal_format == GL_RGB_YCBCR_422_CHROMIUM)) { |
| 323 return true; |
| 324 } |
| 325 |
319 // TODO(dshwang): check if it's possible to remove | 326 // TODO(dshwang): check if it's possible to remove |
320 // CHROMIUM_color_buffer_float_rgb. crbug.com/329605 | 327 // CHROMIUM_color_buffer_float_rgb. crbug.com/329605 |
321 if ((feature_info->feature_flags().chromium_color_buffer_float_rgb && | 328 if ((feature_info->feature_flags().chromium_color_buffer_float_rgb && |
322 internal_format == GL_RGB32F) || | 329 internal_format == GL_RGB32F) || |
323 (feature_info->feature_flags().chromium_color_buffer_float_rgba && | 330 (feature_info->feature_flags().chromium_color_buffer_float_rgba && |
324 internal_format == GL_RGBA32F)) { | 331 internal_format == GL_RGBA32F)) { |
325 return true; | 332 return true; |
326 } | 333 } |
327 | 334 |
328 return feature_info->IsES3Enabled(); | 335 return feature_info->IsES3Enabled(); |
(...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3600 uint32_t TextureManager::GetServiceIdGeneration() const { | 3607 uint32_t TextureManager::GetServiceIdGeneration() const { |
3601 return current_service_id_generation_; | 3608 return current_service_id_generation_; |
3602 } | 3609 } |
3603 | 3610 |
3604 void TextureManager::IncrementServiceIdGeneration() { | 3611 void TextureManager::IncrementServiceIdGeneration() { |
3605 current_service_id_generation_++; | 3612 current_service_id_generation_++; |
3606 } | 3613 } |
3607 | 3614 |
3608 } // namespace gles2 | 3615 } // namespace gles2 |
3609 } // namespace gpu | 3616 } // namespace gpu |
OLD | NEW |