| 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 #include "gpu/command_buffer/service/context_state.h" | 5 #include "gpu/command_buffer/service/context_state.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 10 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 } | 578 } |
| 579 glBindTexture(GL_TEXTURE_2D_ARRAY, 0); | 579 glBindTexture(GL_TEXTURE_2D_ARRAY, 0); |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 | 582 |
| 583 if (active_unit != active_texture_unit) { | 583 if (active_unit != active_texture_unit) { |
| 584 glActiveTexture(GL_TEXTURE0 + active_texture_unit); | 584 glActiveTexture(GL_TEXTURE0 + active_texture_unit); |
| 585 } | 585 } |
| 586 } | 586 } |
| 587 | 587 |
| 588 PixelStoreParams ContextState::GetPackParams() { |
| 589 PixelStoreParams params; |
| 590 params.alignment = pack_alignment; |
| 591 params.row_length = pack_row_length; |
| 592 params.skip_pixels = pack_skip_pixels; |
| 593 params.skip_rows = pack_skip_rows; |
| 594 return params; |
| 595 } |
| 596 |
| 597 PixelStoreParams ContextState::GetUnpackParams(Dimension dimension) { |
| 598 PixelStoreParams params; |
| 599 params.alignment = unpack_alignment; |
| 600 params.row_length = unpack_row_length; |
| 601 params.skip_pixels = unpack_skip_pixels; |
| 602 params.skip_rows = unpack_skip_rows; |
| 603 if (dimension == k3D) { |
| 604 params.image_height = unpack_image_height; |
| 605 params.skip_images = unpack_skip_images; |
| 606 } |
| 607 return params; |
| 608 } |
| 609 |
| 588 // Include the auto-generated part of this file. We split this because it means | 610 // Include the auto-generated part of this file. We split this because it means |
| 589 // we can easily edit the non-auto generated parts right here in this file | 611 // we can easily edit the non-auto generated parts right here in this file |
| 590 // instead of having to edit some template or the code generator. | 612 // instead of having to edit some template or the code generator. |
| 591 #include "gpu/command_buffer/service/context_state_impl_autogen.h" | 613 #include "gpu/command_buffer/service/context_state_impl_autogen.h" |
| 592 | 614 |
| 593 } // namespace gles2 | 615 } // namespace gles2 |
| 594 } // namespace gpu | 616 } // namespace gpu |
| OLD | NEW |