| 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 5783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5794 } | 5794 } |
| 5795 | 5795 |
| 5796 error::Error GLES2DecoderImpl::HandlePixelStorei( | 5796 error::Error GLES2DecoderImpl::HandlePixelStorei( |
| 5797 uint32 immediate_data_size, const gles2::PixelStorei& c) { | 5797 uint32 immediate_data_size, const gles2::PixelStorei& c) { |
| 5798 GLenum pname = c.pname; | 5798 GLenum pname = c.pname; |
| 5799 GLenum param = c.param; | 5799 GLenum param = c.param; |
| 5800 if (!validators_->pixel_store.IsValid(pname)) { | 5800 if (!validators_->pixel_store.IsValid(pname)) { |
| 5801 SetGLError(GL_INVALID_ENUM, "glPixelStorei: pname GL_INVALID_ENUM"); | 5801 SetGLError(GL_INVALID_ENUM, "glPixelStorei: pname GL_INVALID_ENUM"); |
| 5802 return error::kNoError; | 5802 return error::kNoError; |
| 5803 } | 5803 } |
| 5804 if (!validators_->pixel_store_alignment.IsValid(param)) { | 5804 switch (pname) { |
| 5805 SetGLError(GL_INVALID_VALUE, "glPixelSTore: param GL_INVALID_VALUE"); | 5805 case GL_PACK_ALIGNMENT: |
| 5806 return error::kNoError; | 5806 case GL_UNPACK_ALIGNMENT: |
| 5807 if (!validators_->pixel_store_alignment.IsValid(param)) { |
| 5808 SetGLError(GL_INVALID_VALUE, |
| 5809 "glPixelSTore: param GL_INVALID_VALUE"); |
| 5810 return error::kNoError; |
| 5811 } |
| 5812 default: |
| 5813 break; |
| 5807 } | 5814 } |
| 5808 glPixelStorei(pname, param); | 5815 glPixelStorei(pname, param); |
| 5809 switch (pname) { | 5816 switch (pname) { |
| 5810 case GL_PACK_ALIGNMENT: | 5817 case GL_PACK_ALIGNMENT: |
| 5811 pack_alignment_ = param; | 5818 pack_alignment_ = param; |
| 5812 break; | 5819 break; |
| 5820 case GL_PACK_REVERSE_ROW_ORDER_ANGLE: |
| 5821 break; |
| 5813 case GL_UNPACK_ALIGNMENT: | 5822 case GL_UNPACK_ALIGNMENT: |
| 5814 unpack_alignment_ = param; | 5823 unpack_alignment_ = param; |
| 5815 break; | 5824 break; |
| 5816 default: | 5825 default: |
| 5817 // Validation should have prevented us from getting here. | 5826 // Validation should have prevented us from getting here. |
| 5818 NOTREACHED(); | 5827 NOTREACHED(); |
| 5819 break; | 5828 break; |
| 5820 } | 5829 } |
| 5821 return error::kNoError; | 5830 return error::kNoError; |
| 5822 } | 5831 } |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7675 } | 7684 } |
| 7676 | 7685 |
| 7677 | 7686 |
| 7678 // Include the auto-generated part of this file. We split this because it means | 7687 // Include the auto-generated part of this file. We split this because it means |
| 7679 // we can easily edit the non-auto generated parts right here in this file | 7688 // we can easily edit the non-auto generated parts right here in this file |
| 7680 // instead of having to edit some template or the code generator. | 7689 // instead of having to edit some template or the code generator. |
| 7681 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7690 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 7682 | 7691 |
| 7683 } // namespace gles2 | 7692 } // namespace gles2 |
| 7684 } // namespace gpu | 7693 } // namespace gpu |
| OLD | NEW |