| 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 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3749 | 3749 |
| 3750 void GLES2Implementation::RetireSyncPointCHROMIUM(GLuint sync_point) { | 3750 void GLES2Implementation::RetireSyncPointCHROMIUM(GLuint sync_point) { |
| 3751 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 3751 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 3752 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRetireSyncPointCHROMIUM(" | 3752 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRetireSyncPointCHROMIUM(" |
| 3753 << sync_point << ")"); | 3753 << sync_point << ")"); |
| 3754 DCHECK(capabilities_.future_sync_points); | 3754 DCHECK(capabilities_.future_sync_points); |
| 3755 helper_->CommandBufferHelper::Flush(); | 3755 helper_->CommandBufferHelper::Flush(); |
| 3756 gpu_control_->RetireSyncPoint(sync_point); | 3756 gpu_control_->RetireSyncPoint(sync_point); |
| 3757 } | 3757 } |
| 3758 | 3758 |
| 3759 void GLES2Implementation::WaitSyncPointCHROMIUM(GLuint sync_point) { |
| 3760 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 3761 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitSyncPointCHROMIUM(" |
| 3762 << sync_point << ")"); |
| 3763 helper_->WillWaitOnSyncPoint(sync_point); |
| 3764 CheckGLError(); |
| 3765 } |
| 3766 |
| 3759 namespace { | 3767 namespace { |
| 3760 | 3768 |
| 3761 bool ValidImageFormat(GLenum internalformat) { | 3769 bool ValidImageFormat(GLenum internalformat) { |
| 3762 switch (internalformat) { | 3770 switch (internalformat) { |
| 3763 case GL_RGB: | 3771 case GL_RGB: |
| 3764 case GL_RGBA: | 3772 case GL_RGBA: |
| 3765 return true; | 3773 return true; |
| 3766 default: | 3774 default: |
| 3767 return false; | 3775 return false; |
| 3768 } | 3776 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3925 return true; | 3933 return true; |
| 3926 } | 3934 } |
| 3927 | 3935 |
| 3928 // Include the auto-generated part of this file. We split this because it means | 3936 // Include the auto-generated part of this file. We split this because it means |
| 3929 // we can easily edit the non-auto generated parts right here in this file | 3937 // we can easily edit the non-auto generated parts right here in this file |
| 3930 // instead of having to edit some template or the code generator. | 3938 // instead of having to edit some template or the code generator. |
| 3931 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 3939 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 3932 | 3940 |
| 3933 } // namespace gles2 | 3941 } // namespace gles2 |
| 3934 } // namespace gpu | 3942 } // namespace gpu |
| OLD | NEW |