| 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 // This file is here so other GLES2 related files can have a common set of | 5 // This file is here so other GLES2 related files can have a common set of |
| 6 // includes where appropriate. | 6 // includes where appropriate. |
| 7 | 7 |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 | 9 |
| 10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
| (...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 case GL_RG16UI: | 1302 case GL_RG16UI: |
| 1303 case GL_RG16I: | 1303 case GL_RG16I: |
| 1304 case GL_RG32UI: | 1304 case GL_RG32UI: |
| 1305 case GL_RG32I: | 1305 case GL_RG32I: |
| 1306 return true; | 1306 return true; |
| 1307 default: | 1307 default: |
| 1308 return false; | 1308 return false; |
| 1309 } | 1309 } |
| 1310 } | 1310 } |
| 1311 | 1311 |
| 1312 GLint GLES2Util::GetColorEncodingFromInternalFormat(uint32_t internalformat) { | |
| 1313 switch (internalformat) { | |
| 1314 case GL_SRGB_EXT: | |
| 1315 case GL_SRGB_ALPHA_EXT: | |
| 1316 case GL_SRGB8: | |
| 1317 case GL_SRGB8_ALPHA8: | |
| 1318 return GL_SRGB; | |
| 1319 default: | |
| 1320 return GL_LINEAR; | |
| 1321 } | |
| 1322 } | |
| 1323 | |
| 1324 void GLES2Util::GetColorFormatComponentSizes( | 1312 void GLES2Util::GetColorFormatComponentSizes( |
| 1325 uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a) { | 1313 uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a) { |
| 1326 DCHECK(r && g && b && a); | 1314 DCHECK(r && g && b && a); |
| 1327 *r = 0; | 1315 *r = 0; |
| 1328 *g = 0; | 1316 *g = 0; |
| 1329 *b = 0; | 1317 *b = 0; |
| 1330 *a = 0; | 1318 *a = 0; |
| 1331 | 1319 |
| 1332 switch (internal_format) { | 1320 switch (internal_format) { |
| 1333 case GL_LUMINANCE: | 1321 case GL_LUMINANCE: |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1964 } | 1952 } |
| 1965 } | 1953 } |
| 1966 | 1954 |
| 1967 return true; | 1955 return true; |
| 1968 } | 1956 } |
| 1969 | 1957 |
| 1970 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" | 1958 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" |
| 1971 | 1959 |
| 1972 } // namespace gles2 | 1960 } // namespace gles2 |
| 1973 } // namespace gpu | 1961 } // namespace gpu |
| OLD | NEW |