| 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 <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2436 viewport_max_width_ = viewport_params[0]; | 2436 viewport_max_width_ = viewport_params[0]; |
| 2437 viewport_max_height_ = viewport_params[1]; | 2437 viewport_max_height_ = viewport_params[1]; |
| 2438 | 2438 |
| 2439 state_.scissor_width = state_.viewport_width; | 2439 state_.scissor_width = state_.viewport_width; |
| 2440 state_.scissor_height = state_.viewport_height; | 2440 state_.scissor_height = state_.viewport_height; |
| 2441 | 2441 |
| 2442 // Set all the default state because some GL drivers get it wrong. | 2442 // Set all the default state because some GL drivers get it wrong. |
| 2443 state_.InitCapabilities(); | 2443 state_.InitCapabilities(); |
| 2444 state_.InitState(); | 2444 state_.InitState(); |
| 2445 glActiveTexture(GL_TEXTURE0 + state_.active_texture_unit); | 2445 glActiveTexture(GL_TEXTURE0 + state_.active_texture_unit); |
| 2446 glHint(GL_GENERATE_MIPMAP_HINT, state_.hint_generate_mipmap); | |
| 2447 glPixelStorei(GL_PACK_ALIGNMENT, state_.pack_alignment); | |
| 2448 glPixelStorei(GL_UNPACK_ALIGNMENT, state_.unpack_alignment); | |
| 2449 | 2446 |
| 2450 DoBindBuffer(GL_ARRAY_BUFFER, 0); | 2447 DoBindBuffer(GL_ARRAY_BUFFER, 0); |
| 2451 DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); | 2448 DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
| 2452 DoBindFramebuffer(GL_FRAMEBUFFER, 0); | 2449 DoBindFramebuffer(GL_FRAMEBUFFER, 0); |
| 2453 DoBindRenderbuffer(GL_RENDERBUFFER, 0); | 2450 DoBindRenderbuffer(GL_RENDERBUFFER, 0); |
| 2454 | 2451 |
| 2455 // Clear the backbuffer. | 2452 // Clear the backbuffer. |
| 2456 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); | 2453 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); |
| 2457 | 2454 |
| 2458 if (feature_info_->workarounds().reverse_point_sprite_coord_origin) { | 2455 if (feature_info_->workarounds().reverse_point_sprite_coord_origin) { |
| (...skipping 7874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10333 return error::kNoError; | 10330 return error::kNoError; |
| 10334 } | 10331 } |
| 10335 | 10332 |
| 10336 // Include the auto-generated part of this file. We split this because it means | 10333 // Include the auto-generated part of this file. We split this because it means |
| 10337 // we can easily edit the non-auto generated parts right here in this file | 10334 // we can easily edit the non-auto generated parts right here in this file |
| 10338 // instead of having to edit some template or the code generator. | 10335 // instead of having to edit some template or the code generator. |
| 10339 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10336 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 10340 | 10337 |
| 10341 } // namespace gles2 | 10338 } // namespace gles2 |
| 10342 } // namespace gpu | 10339 } // namespace gpu |
| OLD | NEW |