| 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 namespace gpu { | 7 namespace gpu { |
| 8 namespace gles2 { | 8 namespace gles2 { |
| 9 | 9 |
| 10 TextureUnit::TextureUnit() | 10 TextureUnit::TextureUnit() |
| 11 : bind_target(GL_TEXTURE_2D) { | 11 : bind_target(GL_TEXTURE_2D) { |
| 12 } | 12 } |
| 13 | 13 |
| 14 TextureUnit::~TextureUnit() { | 14 TextureUnit::~TextureUnit() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 ContextState::ContextState() | 17 ContextState::ContextState() |
| 18 : pack_alignment(4), | 18 : pack_alignment(4), |
| 19 unpack_alignment(4), | 19 unpack_alignment(4), |
| 20 active_texture_unit(0), | 20 active_texture_unit(0), |
| 21 color_clear_red(0), | |
| 22 color_clear_green(0), | |
| 23 color_clear_blue(0), | |
| 24 color_clear_alpha(0), | |
| 25 color_mask_red(true), | |
| 26 color_mask_green(true), | |
| 27 color_mask_blue(true), | |
| 28 color_mask_alpha(true), | |
| 29 depth_clear(1.0f), | |
| 30 depth_mask(true), | |
| 31 depth_func(GL_LESS), | |
| 32 z_near(0.0f), | |
| 33 z_far(1.0f), | |
| 34 enable_blend(false), | |
| 35 enable_cull_face(false), | |
| 36 enable_scissor_test(false), | |
| 37 enable_depth_test(false), | |
| 38 enable_stencil_test(false), | |
| 39 enable_polygon_offset_fill(false), | |
| 40 enable_dither(true), | |
| 41 enable_sample_alpha_to_coverage(false), | |
| 42 enable_sample_coverage(false), | |
| 43 viewport_x(0), | |
| 44 viewport_y(0), | |
| 45 viewport_width(0), | |
| 46 viewport_height(0), | |
| 47 viewport_max_width(0), | 21 viewport_max_width(0), |
| 48 viewport_max_height(0), | 22 viewport_max_height(0), |
| 49 scissor_x(0), | |
| 50 scissor_y(0), | |
| 51 scissor_width(0), | |
| 52 scissor_height(0), | |
| 53 cull_mode(GL_BACK), | |
| 54 front_face(GL_CCW), | |
| 55 blend_source_rgb(GL_ONE), | |
| 56 blend_dest_rgb(GL_ZERO), | |
| 57 blend_source_alpha(GL_ONE), | |
| 58 blend_dest_alpha(GL_ZERO), | |
| 59 blend_equation_rgb(GL_FUNC_ADD), | |
| 60 blend_equation_alpha(GL_FUNC_ADD), | |
| 61 blend_color_red(0), | |
| 62 blend_color_green(0), | |
| 63 blend_color_blue(0), | |
| 64 blend_color_alpha(0), | |
| 65 stencil_clear(0), | |
| 66 stencil_front_writemask(0xFFFFFFFFU), | |
| 67 stencil_front_func(GL_ALWAYS), | |
| 68 stencil_front_ref(0), | |
| 69 stencil_front_mask(0xFFFFFFFFU), | |
| 70 stencil_front_fail_op(GL_KEEP), | |
| 71 stencil_front_z_fail_op(GL_KEEP), | |
| 72 stencil_front_z_pass_op(GL_KEEP), | |
| 73 stencil_back_writemask(0xFFFFFFFFU), | |
| 74 stencil_back_func(GL_ALWAYS), | |
| 75 stencil_back_ref(0), | |
| 76 stencil_back_mask(0xFFFFFFFFU), | |
| 77 stencil_back_fail_op(GL_KEEP), | |
| 78 stencil_back_z_fail_op(GL_KEEP), | |
| 79 stencil_back_z_pass_op(GL_KEEP), | |
| 80 polygon_offset_factor(0.0f), | |
| 81 polygon_offset_units(0.0f), | |
| 82 sample_coverage_value(1.0f), | |
| 83 sample_coverage_invert(false), | |
| 84 line_width(1.0), | |
| 85 hint_generate_mipmap(GL_DONT_CARE), | 23 hint_generate_mipmap(GL_DONT_CARE), |
| 86 hint_fragment_shader_derivative(GL_DONT_CARE), | 24 hint_fragment_shader_derivative(GL_DONT_CARE), |
| 87 pack_reverse_row_order(false) { | 25 pack_reverse_row_order(false) { |
| 26 Initialize(); |
| 88 } | 27 } |
| 89 | 28 |
| 90 ContextState::~ContextState() { | 29 ContextState::~ContextState() { |
| 91 } | 30 } |
| 92 | 31 |
| 32 // Include the auto-generated part of this file. We split this because it means |
| 33 // we can easily edit the non-auto generated parts right here in this file |
| 34 // instead of having to edit some template or the code generator. |
| 35 #include "gpu/command_buffer/service/context_state_impl_autogen.h" |
| 36 |
| 93 } // namespace gles2 | 37 } // namespace gles2 |
| 94 } // namespace gpu | 38 } // namespace gpu |
| 95 | 39 |
| 96 | 40 |
| OLD | NEW |