| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
| 9 #include <GLES2/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
| 10 #include <GLES2/gles2_command_buffer.h> | 10 #include <GLES2/gles2_command_buffer.h> |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 uint32 GLES2Util::GetChannelsForFormat(int format) { | 506 uint32 GLES2Util::GetChannelsForFormat(int format) { |
| 507 switch (format) { | 507 switch (format) { |
| 508 case GL_ALPHA: | 508 case GL_ALPHA: |
| 509 return 0x0008; | 509 return 0x0008; |
| 510 case GL_LUMINANCE: | 510 case GL_LUMINANCE: |
| 511 return 0x0007; | 511 return 0x0007; |
| 512 case GL_LUMINANCE_ALPHA: | 512 case GL_LUMINANCE_ALPHA: |
| 513 return 0x000F; | 513 return 0x000F; |
| 514 case GL_RGB: | 514 case GL_RGB: |
| 515 case GL_RGB8_OES: |
| 515 case GL_RGB565: | 516 case GL_RGB565: |
| 516 return 0x0007; | 517 return 0x0007; |
| 517 case GL_RGBA: | 518 case GL_RGBA: |
| 519 case GL_RGBA8_OES: |
| 518 case GL_RGBA4: | 520 case GL_RGBA4: |
| 519 case GL_RGB5_A1: | 521 case GL_RGB5_A1: |
| 520 return 0x000F; | 522 return 0x000F; |
| 521 default: | 523 default: |
| 522 return 0x0000; | 524 return 0x0000; |
| 523 } | 525 } |
| 524 } | 526 } |
| 525 | 527 |
| 526 } // namespace gles2 | 528 } // namespace gles2 |
| 527 } // namespace gpu | 529 } // namespace gpu |
| 528 | 530 |
| OLD | NEW |