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/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
10 #include <GLES2/gl2extchromium.h> | 10 #include <GLES2/gl2extchromium.h> |
(...skipping 4811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4822 << sync_point << ")"); | 4822 << sync_point << ")"); |
4823 DCHECK(capabilities_.future_sync_points); | 4823 DCHECK(capabilities_.future_sync_points); |
4824 helper_->CommandBufferHelper::Flush(); | 4824 helper_->CommandBufferHelper::Flush(); |
4825 gpu_control_->RetireSyncPoint(sync_point); | 4825 gpu_control_->RetireSyncPoint(sync_point); |
4826 } | 4826 } |
4827 | 4827 |
4828 namespace { | 4828 namespace { |
4829 | 4829 |
4830 bool ValidImageFormat(GLenum internalformat) { | 4830 bool ValidImageFormat(GLenum internalformat) { |
4831 switch (internalformat) { | 4831 switch (internalformat) { |
| 4832 case GL_R8: |
4832 case GL_RGB: | 4833 case GL_RGB: |
4833 case GL_RGBA: | 4834 case GL_RGBA: |
4834 case GL_BGRA_EXT: | 4835 case GL_BGRA_EXT: |
4835 return true; | 4836 return true; |
4836 default: | 4837 default: |
4837 return false; | 4838 return false; |
4838 } | 4839 } |
4839 } | 4840 } |
4840 | 4841 |
4841 bool ValidImageUsage(GLenum usage) { | 4842 bool ValidImageUsage(GLenum usage) { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5128 CheckGLError(); | 5129 CheckGLError(); |
5129 } | 5130 } |
5130 | 5131 |
5131 // Include the auto-generated part of this file. We split this because it means | 5132 // Include the auto-generated part of this file. We split this because it means |
5132 // we can easily edit the non-auto generated parts right here in this file | 5133 // we can easily edit the non-auto generated parts right here in this file |
5133 // instead of having to edit some template or the code generator. | 5134 // instead of having to edit some template or the code generator. |
5134 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 5135 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
5135 | 5136 |
5136 } // namespace gles2 | 5137 } // namespace gles2 |
5137 } // namespace gpu | 5138 } // namespace gpu |
OLD | NEW |