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 5721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5732 // Validation should have prevented us from getting here. | 5732 // Validation should have prevented us from getting here. |
5733 NOTREACHED(); | 5733 NOTREACHED(); |
5734 break; | 5734 break; |
5735 } | 5735 } |
5736 return error::kNoError; | 5736 return error::kNoError; |
5737 } | 5737 } |
5738 | 5738 |
5739 error::Error GLES2DecoderImpl::HandlePostSubBufferCHROMIUM( | 5739 error::Error GLES2DecoderImpl::HandlePostSubBufferCHROMIUM( |
5740 uint32 immediate_data_size, const gles2::PostSubBufferCHROMIUM& c) { | 5740 uint32 immediate_data_size, const gles2::PostSubBufferCHROMIUM& c) { |
5741 TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandlePostSubBufferCHROMIUM"); | 5741 TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandlePostSubBufferCHROMIUM"); |
5742 if (!surface_->SupportsPostSubBuffer()) { | 5742 if (!context_->HasExtension("GL_CHROMIUM_post_sub_buffer")) { |
5743 SetGLError(GL_INVALID_OPERATION, | 5743 SetGLError(GL_INVALID_OPERATION, |
5744 "glPostSubBufferCHROMIUM: command not supported by surface"); | 5744 "glPostSubBufferCHROMIUM: command not supported by surface"); |
5745 return error::kNoError; | 5745 return error::kNoError; |
5746 } | 5746 } |
5747 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) | 5747 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) |
5748 return error::kNoError; | 5748 return error::kNoError; |
5749 else | 5749 else |
5750 return error::kLostContext; | 5750 return error::kLostContext; |
5751 } | 5751 } |
5752 | 5752 |
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7484 return error::kNoError; | 7484 return error::kNoError; |
7485 } | 7485 } |
7486 | 7486 |
7487 // Include the auto-generated part of this file. We split this because it means | 7487 // Include the auto-generated part of this file. We split this because it means |
7488 // we can easily edit the non-auto generated parts right here in this file | 7488 // we can easily edit the non-auto generated parts right here in this file |
7489 // instead of having to edit some template or the code generator. | 7489 // instead of having to edit some template or the code generator. |
7490 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7490 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
7491 | 7491 |
7492 } // namespace gles2 | 7492 } // namespace gles2 |
7493 } // namespace gpu | 7493 } // namespace gpu |
OLD | NEW |