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 4813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_RGB: | 4832 case GL_RGB: |
4833 case GL_RGBA: | 4833 case GL_RGBA: |
| 4834 case GL_BGRA_EXT: |
4834 return true; | 4835 return true; |
4835 default: | 4836 default: |
4836 return false; | 4837 return false; |
4837 } | 4838 } |
4838 } | 4839 } |
4839 | 4840 |
4840 bool ValidImageUsage(GLenum usage) { | 4841 bool ValidImageUsage(GLenum usage) { |
4841 switch (usage) { | 4842 switch (usage) { |
4842 case GL_MAP_CHROMIUM: | 4843 case GL_MAP_CHROMIUM: |
4843 case GL_SCANOUT_CHROMIUM: | 4844 case GL_SCANOUT_CHROMIUM: |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5127 CheckGLError(); | 5128 CheckGLError(); |
5128 } | 5129 } |
5129 | 5130 |
5130 // Include the auto-generated part of this file. We split this because it means | 5131 // Include the auto-generated part of this file. We split this because it means |
5131 // we can easily edit the non-auto generated parts right here in this file | 5132 // we can easily edit the non-auto generated parts right here in this file |
5132 // instead of having to edit some template or the code generator. | 5133 // instead of having to edit some template or the code generator. |
5133 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 5134 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
5134 | 5135 |
5135 } // namespace gles2 | 5136 } // namespace gles2 |
5136 } // namespace gpu | 5137 } // namespace gpu |
OLD | NEW |