| 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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 3354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 if (!InitializeShaderTranslator()) { | 3365 if (!InitializeShaderTranslator()) { |
| 3366 return false; | 3366 return false; |
| 3367 } | 3367 } |
| 3368 | 3368 |
| 3369 GLint viewport_params[4] = { 0 }; | 3369 GLint viewport_params[4] = { 0 }; |
| 3370 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, viewport_params); | 3370 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, viewport_params); |
| 3371 viewport_max_width_ = viewport_params[0]; | 3371 viewport_max_width_ = viewport_params[0]; |
| 3372 viewport_max_height_ = viewport_params[1]; | 3372 viewport_max_height_ = viewport_params[1]; |
| 3373 | 3373 |
| 3374 glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, line_width_range_); | 3374 glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, line_width_range_); |
| 3375 state_.SetLineWidthBounds(line_width_range_[0], line_width_range_[1]); |
| 3375 | 3376 |
| 3376 state_.scissor_width = state_.viewport_width; | 3377 state_.scissor_width = state_.viewport_width; |
| 3377 state_.scissor_height = state_.viewport_height; | 3378 state_.scissor_height = state_.viewport_height; |
| 3378 | 3379 |
| 3379 // Set all the default state because some GL drivers get it wrong. | 3380 // Set all the default state because some GL drivers get it wrong. |
| 3380 state_.InitCapabilities(NULL); | 3381 state_.InitCapabilities(NULL); |
| 3381 state_.InitState(NULL); | 3382 state_.InitState(NULL); |
| 3382 | 3383 |
| 3383 // Default state must be set before offscreen resources can be created. | 3384 // Default state must be set before offscreen resources can be created. |
| 3384 if (offscreen) { | 3385 if (offscreen) { |
| (...skipping 15401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18786 } | 18787 } |
| 18787 | 18788 |
| 18788 // Include the auto-generated part of this file. We split this because it means | 18789 // Include the auto-generated part of this file. We split this because it means |
| 18789 // we can easily edit the non-auto generated parts right here in this file | 18790 // we can easily edit the non-auto generated parts right here in this file |
| 18790 // instead of having to edit some template or the code generator. | 18791 // instead of having to edit some template or the code generator. |
| 18791 #include "base/macros.h" | 18792 #include "base/macros.h" |
| 18792 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18793 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 18793 | 18794 |
| 18794 } // namespace gles2 | 18795 } // namespace gles2 |
| 18795 } // namespace gpu | 18796 } // namespace gpu |
| OLD | NEW |