| 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 5353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5364 | 5364 |
| 5365 void GLES2Implementation::RetireSyncPointCHROMIUM(GLuint sync_point) { | 5365 void GLES2Implementation::RetireSyncPointCHROMIUM(GLuint sync_point) { |
| 5366 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 5366 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 5367 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRetireSyncPointCHROMIUM(" | 5367 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRetireSyncPointCHROMIUM(" |
| 5368 << sync_point << ")"); | 5368 << sync_point << ")"); |
| 5369 DCHECK(capabilities_.future_sync_points); | 5369 DCHECK(capabilities_.future_sync_points); |
| 5370 helper_->CommandBufferHelper::Flush(); | 5370 helper_->CommandBufferHelper::Flush(); |
| 5371 gpu_control_->RetireSyncPoint(sync_point); | 5371 gpu_control_->RetireSyncPoint(sync_point); |
| 5372 } | 5372 } |
| 5373 | 5373 |
| 5374 bool GLES2Implementation::IsContextLost() { |
| 5375 return helper_->IsContextLost(); |
| 5376 } |
| 5377 |
| 5374 namespace { | 5378 namespace { |
| 5375 | 5379 |
| 5376 bool ValidImageFormat(GLenum internalformat, | 5380 bool ValidImageFormat(GLenum internalformat, |
| 5377 const Capabilities& capabilities) { | 5381 const Capabilities& capabilities) { |
| 5378 switch (internalformat) { | 5382 switch (internalformat) { |
| 5379 case GL_ATC_RGB_AMD: | 5383 case GL_ATC_RGB_AMD: |
| 5380 case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD: | 5384 case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD: |
| 5381 return capabilities.texture_format_atc; | 5385 return capabilities.texture_format_atc; |
| 5382 case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: | 5386 case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: |
| 5383 return capabilities.texture_format_dxt1; | 5387 return capabilities.texture_format_dxt1; |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5685 CheckGLError(); | 5689 CheckGLError(); |
| 5686 } | 5690 } |
| 5687 | 5691 |
| 5688 // Include the auto-generated part of this file. We split this because it means | 5692 // Include the auto-generated part of this file. We split this because it means |
| 5689 // we can easily edit the non-auto generated parts right here in this file | 5693 // we can easily edit the non-auto generated parts right here in this file |
| 5690 // instead of having to edit some template or the code generator. | 5694 // instead of having to edit some template or the code generator. |
| 5691 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 5695 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 5692 | 5696 |
| 5693 } // namespace gles2 | 5697 } // namespace gles2 |
| 5694 } // namespace gpu | 5698 } // namespace gpu |
| OLD | NEW |