Chromium Code Reviews| 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 5182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5193 << sync_point << ")"); | 5193 << sync_point << ")"); |
| 5194 DCHECK(capabilities_.future_sync_points); | 5194 DCHECK(capabilities_.future_sync_points); |
| 5195 helper_->CommandBufferHelper::Flush(); | 5195 helper_->CommandBufferHelper::Flush(); |
| 5196 gpu_control_->RetireSyncPoint(sync_point); | 5196 gpu_control_->RetireSyncPoint(sync_point); |
| 5197 } | 5197 } |
| 5198 | 5198 |
| 5199 namespace { | 5199 namespace { |
| 5200 | 5200 |
| 5201 bool ValidImageFormat(GLenum internalformat) { | 5201 bool ValidImageFormat(GLenum internalformat) { |
| 5202 switch (internalformat) { | 5202 switch (internalformat) { |
| 5203 case GL_ATC_RGB_AMD: | |
| 5204 case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD: | |
| 5205 case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: | |
| 5206 case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: | |
| 5207 case GL_ETC1_RGB8_OES: | |
|
piman
2015/05/13 16:41:57
Can we return false if the corresponding extension
christiank
2015/05/18 11:10:52
Good idea, fixed.
| |
| 5203 case GL_R8: | 5208 case GL_R8: |
| 5204 case GL_RGB: | 5209 case GL_RGB: |
| 5205 case GL_RGBA: | 5210 case GL_RGBA: |
| 5206 case GL_BGRA_EXT: | 5211 case GL_BGRA_EXT: |
| 5207 return true; | 5212 return true; |
| 5208 default: | 5213 default: |
| 5209 return false; | 5214 return false; |
| 5210 } | 5215 } |
| 5211 } | 5216 } |
| 5212 | 5217 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5500 CheckGLError(); | 5505 CheckGLError(); |
| 5501 } | 5506 } |
| 5502 | 5507 |
| 5503 // Include the auto-generated part of this file. We split this because it means | 5508 // Include the auto-generated part of this file. We split this because it means |
| 5504 // we can easily edit the non-auto generated parts right here in this file | 5509 // we can easily edit the non-auto generated parts right here in this file |
| 5505 // instead of having to edit some template or the code generator. | 5510 // instead of having to edit some template or the code generator. |
| 5506 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 5511 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 5507 | 5512 |
| 5508 } // namespace gles2 | 5513 } // namespace gles2 |
| 5509 } // namespace gpu | 5514 } // namespace gpu |
| OLD | NEW |