OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 5722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5733 unpack_alignment_ = param; | 5733 unpack_alignment_ = param; |
5734 break; | 5734 break; |
5735 default: | 5735 default: |
5736 // Validation should have prevented us from getting here. | 5736 // Validation should have prevented us from getting here. |
5737 NOTREACHED(); | 5737 NOTREACHED(); |
5738 break; | 5738 break; |
5739 } | 5739 } |
5740 return error::kNoError; | 5740 return error::kNoError; |
5741 } | 5741 } |
5742 | 5742 |
| 5743 error::Error GLES2DecoderImpl::HandlePostSubBufferCHROMIUM( |
| 5744 uint32 immediate_data_size, const gles2::PostSubBufferCHROMIUM& c) { |
| 5745 TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandlePostSubBufferCHROMIUM"); |
| 5746 if (!surface_->SupportsPostSubBuffer()) { |
| 5747 SetGLError(GL_INVALID_OPERATION, |
| 5748 "glPostSubBufferCHROMIUM: command not supported by surface"); |
| 5749 return error::kNoError; |
| 5750 } |
| 5751 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) |
| 5752 return error::kNoError; |
| 5753 else |
| 5754 return error::kLostContext; |
| 5755 } |
| 5756 |
5743 error::Error GLES2DecoderImpl::GetAttribLocationHelper( | 5757 error::Error GLES2DecoderImpl::GetAttribLocationHelper( |
5744 GLuint client_id, uint32 location_shm_id, uint32 location_shm_offset, | 5758 GLuint client_id, uint32 location_shm_id, uint32 location_shm_offset, |
5745 const std::string& name_str) { | 5759 const std::string& name_str) { |
5746 if (!StringIsValidForGLES(name_str.c_str())) { | 5760 if (!StringIsValidForGLES(name_str.c_str())) { |
5747 SetGLError(GL_INVALID_VALUE, "glGetAttribLocation: Invalid character"); | 5761 SetGLError(GL_INVALID_VALUE, "glGetAttribLocation: Invalid character"); |
5748 return error::kNoError; | 5762 return error::kNoError; |
5749 } | 5763 } |
5750 ProgramManager::ProgramInfo* info = GetProgramInfoNotShader( | 5764 ProgramManager::ProgramInfo* info = GetProgramInfoNotShader( |
5751 client_id, "glGetAttribLocation"); | 5765 client_id, "glGetAttribLocation"); |
5752 if (!info) { | 5766 if (!info) { |
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7471 return error::kNoError; | 7485 return error::kNoError; |
7472 } | 7486 } |
7473 | 7487 |
7474 // Include the auto-generated part of this file. We split this because it means | 7488 // Include the auto-generated part of this file. We split this because it means |
7475 // we can easily edit the non-auto generated parts right here in this file | 7489 // we can easily edit the non-auto generated parts right here in this file |
7476 // instead of having to edit some template or the code generator. | 7490 // instead of having to edit some template or the code generator. |
7477 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7491 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
7478 | 7492 |
7479 } // namespace gles2 | 7493 } // namespace gles2 |
7480 } // namespace gpu | 7494 } // namespace gpu |
OLD | NEW |