Chromium Code Reviews| 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 5698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5709 } | 5709 } |
| 5710 | 5710 |
| 5711 error::Error GLES2DecoderImpl::HandlePixelStorei( | 5711 error::Error GLES2DecoderImpl::HandlePixelStorei( |
| 5712 uint32 immediate_data_size, const gles2::PixelStorei& c) { | 5712 uint32 immediate_data_size, const gles2::PixelStorei& c) { |
| 5713 GLenum pname = c.pname; | 5713 GLenum pname = c.pname; |
| 5714 GLenum param = c.param; | 5714 GLenum param = c.param; |
| 5715 if (!validators_->pixel_store.IsValid(pname)) { | 5715 if (!validators_->pixel_store.IsValid(pname)) { |
| 5716 SetGLError(GL_INVALID_ENUM, "glPixelStorei: pname GL_INVALID_ENUM"); | 5716 SetGLError(GL_INVALID_ENUM, "glPixelStorei: pname GL_INVALID_ENUM"); |
| 5717 return error::kNoError; | 5717 return error::kNoError; |
| 5718 } | 5718 } |
| 5719 if (!validators_->pixel_store_alignment.IsValid(param)) { | 5719 if (GL_PACK_REVERSE_ROW_ORDER_ANGLE != pname && |
|
greggman
2011/11/29 21:32:27
this might be more future proof as a switch?
| |
| 5720 !validators_->pixel_store_alignment.IsValid(param)) { | |
| 5720 SetGLError(GL_INVALID_VALUE, "glPixelSTore: param GL_INVALID_VALUE"); | 5721 SetGLError(GL_INVALID_VALUE, "glPixelSTore: param GL_INVALID_VALUE"); |
| 5721 return error::kNoError; | 5722 return error::kNoError; |
| 5722 } | 5723 } |
| 5723 glPixelStorei(pname, param); | 5724 glPixelStorei(pname, param); |
| 5724 switch (pname) { | 5725 switch (pname) { |
| 5725 case GL_PACK_ALIGNMENT: | 5726 case GL_PACK_ALIGNMENT: |
| 5726 pack_alignment_ = param; | 5727 pack_alignment_ = param; |
| 5727 break; | 5728 break; |
| 5729 case GL_PACK_REVERSE_ROW_ORDER_ANGLE: | |
| 5730 break; | |
| 5728 case GL_UNPACK_ALIGNMENT: | 5731 case GL_UNPACK_ALIGNMENT: |
| 5729 unpack_alignment_ = param; | 5732 unpack_alignment_ = param; |
| 5730 break; | 5733 break; |
| 5731 default: | 5734 default: |
| 5732 // Validation should have prevented us from getting here. | 5735 // Validation should have prevented us from getting here. |
| 5733 NOTREACHED(); | 5736 NOTREACHED(); |
| 5734 break; | 5737 break; |
| 5735 } | 5738 } |
| 5736 return error::kNoError; | 5739 return error::kNoError; |
| 5737 } | 5740 } |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7484 return error::kNoError; | 7487 return error::kNoError; |
| 7485 } | 7488 } |
| 7486 | 7489 |
| 7487 // Include the auto-generated part of this file. We split this because it means | 7490 // 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 | 7491 // 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. | 7492 // instead of having to edit some template or the code generator. |
| 7490 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7493 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 7491 | 7494 |
| 7492 } // namespace gles2 | 7495 } // namespace gles2 |
| 7493 } // namespace gpu | 7496 } // namespace gpu |
| OLD | NEW |