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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 | 8 |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 5552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5563 case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: | 5563 case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: |
5564 return capabilities.texture_format_dxt1; | 5564 return capabilities.texture_format_dxt1; |
5565 case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: | 5565 case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: |
5566 return capabilities.texture_format_dxt5; | 5566 return capabilities.texture_format_dxt5; |
5567 case GL_ETC1_RGB8_OES: | 5567 case GL_ETC1_RGB8_OES: |
5568 return capabilities.texture_format_etc1; | 5568 return capabilities.texture_format_etc1; |
5569 case GL_RED: | 5569 case GL_RED: |
5570 case GL_RGB: | 5570 case GL_RGB: |
5571 case GL_RGBA: | 5571 case GL_RGBA: |
5572 case GL_RGB_YCBCR_422_CHROMIUM: | 5572 case GL_RGB_YCBCR_422_CHROMIUM: |
| 5573 case GL_RGB_YCBCR_420V_CHROMIUM: |
5573 case GL_BGRA_EXT: | 5574 case GL_BGRA_EXT: |
5574 return true; | 5575 return true; |
5575 default: | 5576 default: |
5576 return false; | 5577 return false; |
5577 } | 5578 } |
5578 } | 5579 } |
5579 | 5580 |
5580 bool ValidImageUsage(GLenum usage) { | 5581 bool ValidImageUsage(GLenum usage) { |
5581 return usage == GL_READ_WRITE_CHROMIUM; | 5582 return usage == GL_READ_WRITE_CHROMIUM; |
5582 } | 5583 } |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6445 CheckGLError(); | 6446 CheckGLError(); |
6446 } | 6447 } |
6447 | 6448 |
6448 // Include the auto-generated part of this file. We split this because it means | 6449 // Include the auto-generated part of this file. We split this because it means |
6449 // we can easily edit the non-auto generated parts right here in this file | 6450 // we can easily edit the non-auto generated parts right here in this file |
6450 // instead of having to edit some template or the code generator. | 6451 // instead of having to edit some template or the code generator. |
6451 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 6452 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
6452 | 6453 |
6453 } // namespace gles2 | 6454 } // namespace gles2 |
6454 } // namespace gpu | 6455 } // namespace gpu |
OLD | NEW |