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 "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetMaxValueInBufferCHROMIUM(" | 987 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetMaxValueInBufferCHROMIUM(" |
988 << buffer_id << ", " << count << ", " | 988 << buffer_id << ", " << count << ", " |
989 << GLES2Util::GetStringGetMaxIndexType(type) | 989 << GLES2Util::GetStringGetMaxIndexType(type) |
990 << ", " << offset << ")"); | 990 << ", " << offset << ")"); |
991 GLuint result = GetMaxValueInBufferCHROMIUMHelper( | 991 GLuint result = GetMaxValueInBufferCHROMIUMHelper( |
992 buffer_id, count, type, offset); | 992 buffer_id, count, type, offset); |
993 GPU_CLIENT_LOG("returned " << result); | 993 GPU_CLIENT_LOG("returned " << result); |
994 return result; | 994 return result; |
995 } | 995 } |
996 | 996 |
997 void GLES2Implementation::Clear(GLbitfield mask) { | |
998 GPU_CLIENT_SINGLE_THREAD_CHECK(); | |
999 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClear(" << mask << ")"); | |
1000 helper_->Clear(mask); | |
1001 } | |
1002 | |
1003 void GLES2Implementation::DrawElements( | 997 void GLES2Implementation::DrawElements( |
1004 GLenum mode, GLsizei count, GLenum type, const void* indices) { | 998 GLenum mode, GLsizei count, GLenum type, const void* indices) { |
1005 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 999 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
1006 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDrawElements(" | 1000 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDrawElements(" |
1007 << GLES2Util::GetStringDrawMode(mode) << ", " | 1001 << GLES2Util::GetStringDrawMode(mode) << ", " |
1008 << count << ", " | 1002 << count << ", " |
1009 << GLES2Util::GetStringIndexType(type) << ", " | 1003 << GLES2Util::GetStringIndexType(type) << ", " |
1010 << static_cast<const void*>(indices) << ")"); | 1004 << static_cast<const void*>(indices) << ")"); |
1011 if (count < 0) { | 1005 if (count < 0) { |
1012 SetGLError(GL_INVALID_VALUE, "glDrawElements", "count less than 0."); | 1006 SetGLError(GL_INVALID_VALUE, "glDrawElements", "count less than 0."); |
(...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3659 return true; | 3653 return true; |
3660 } | 3654 } |
3661 | 3655 |
3662 // Include the auto-generated part of this file. We split this because it means | 3656 // Include the auto-generated part of this file. We split this because it means |
3663 // we can easily edit the non-auto generated parts right here in this file | 3657 // we can easily edit the non-auto generated parts right here in this file |
3664 // instead of having to edit some template or the code generator. | 3658 // instead of having to edit some template or the code generator. |
3665 #include "../client/gles2_implementation_impl_autogen.h" | 3659 #include "../client/gles2_implementation_impl_autogen.h" |
3666 | 3660 |
3667 } // namespace gles2 | 3661 } // namespace gles2 |
3668 } // namespace gpu | 3662 } // namespace gpu |
OLD | NEW |