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 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 if (!result) { | 2824 if (!result) { |
2825 return false; | 2825 return false; |
2826 } | 2826 } |
2827 *result = 0; | 2827 *result = 0; |
2828 SetBucketAsCString(kResultBucketId, feature); | 2828 SetBucketAsCString(kResultBucketId, feature); |
2829 helper_->EnableFeatureCHROMIUM( | 2829 helper_->EnableFeatureCHROMIUM( |
2830 kResultBucketId, GetResultShmId(), GetResultShmOffset()); | 2830 kResultBucketId, GetResultShmId(), GetResultShmOffset()); |
2831 WaitForCmd(); | 2831 WaitForCmd(); |
2832 helper_->SetBucketSize(kResultBucketId, 0); | 2832 helper_->SetBucketSize(kResultBucketId, 0); |
2833 GPU_CLIENT_LOG(" returned " << GLES2Util::GetStringBool(*result)); | 2833 GPU_CLIENT_LOG(" returned " << GLES2Util::GetStringBool(*result)); |
2834 return *result; | 2834 return *result != 0; |
2835 } | 2835 } |
2836 | 2836 |
2837 void* GLES2Implementation::MapBufferSubDataCHROMIUM( | 2837 void* GLES2Implementation::MapBufferSubDataCHROMIUM( |
2838 GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) { | 2838 GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) { |
2839 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 2839 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
2840 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferSubDataCHROMIUM(" | 2840 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferSubDataCHROMIUM(" |
2841 << target << ", " << offset << ", " << size << ", " | 2841 << target << ", " << offset << ", " << size << ", " |
2842 << GLES2Util::GetStringEnum(access) << ")"); | 2842 << GLES2Util::GetStringEnum(access) << ")"); |
2843 // NOTE: target is NOT checked because the service will check it | 2843 // NOTE: target is NOT checked because the service will check it |
2844 // and we don't know what targets are valid. | 2844 // and we don't know what targets are valid. |
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4181 return true; | 4181 return true; |
4182 } | 4182 } |
4183 | 4183 |
4184 // Include the auto-generated part of this file. We split this because it means | 4184 // Include the auto-generated part of this file. We split this because it means |
4185 // we can easily edit the non-auto generated parts right here in this file | 4185 // we can easily edit the non-auto generated parts right here in this file |
4186 // instead of having to edit some template or the code generator. | 4186 // instead of having to edit some template or the code generator. |
4187 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4187 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
4188 | 4188 |
4189 } // namespace gles2 | 4189 } // namespace gles2 |
4190 } // namespace gpu | 4190 } // namespace gpu |
OLD | NEW |