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 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3191 if (offscreen_resolved_color_texture_.get()) | 3191 if (offscreen_resolved_color_texture_.get()) |
3192 offscreen_resolved_color_texture_->Destroy(); | 3192 offscreen_resolved_color_texture_->Destroy(); |
3193 offscreen_resolved_color_texture_.reset(); | 3193 offscreen_resolved_color_texture_.reset(); |
3194 offscreen_resolved_frame_buffer_.reset(); | 3194 offscreen_resolved_frame_buffer_.reset(); |
3195 | 3195 |
3196 return true; | 3196 return true; |
3197 } | 3197 } |
3198 | 3198 |
3199 error::Error GLES2DecoderImpl::HandleResizeCHROMIUM( | 3199 error::Error GLES2DecoderImpl::HandleResizeCHROMIUM( |
3200 uint32 immediate_data_size, const gles2::ResizeCHROMIUM& c) { | 3200 uint32 immediate_data_size, const gles2::ResizeCHROMIUM& c) { |
| 3201 if (ShouldDeferDraws()) |
| 3202 return error::kDeferCommandUntilLater; |
| 3203 |
3201 GLuint width = static_cast<GLuint>(c.width); | 3204 GLuint width = static_cast<GLuint>(c.width); |
3202 GLuint height = static_cast<GLuint>(c.height); | 3205 GLuint height = static_cast<GLuint>(c.height); |
3203 TRACE_EVENT2("gpu", "glResizeChromium", "width", width, "height", height); | 3206 TRACE_EVENT2("gpu", "glResizeChromium", "width", width, "height", height); |
3204 #if defined(OS_POSIX) && !defined(OS_MACOSX) && \ | 3207 #if defined(OS_POSIX) && !defined(OS_MACOSX) && \ |
3205 !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 3208 !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
3206 // Make sure that we are done drawing to the back buffer before resizing. | 3209 // Make sure that we are done drawing to the back buffer before resizing. |
3207 glFinish(); | 3210 glFinish(); |
3208 #endif | 3211 #endif |
3209 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); | 3212 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); |
3210 if (is_offscreen) { | 3213 if (is_offscreen) { |
(...skipping 6065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9276 } | 9279 } |
9277 | 9280 |
9278 | 9281 |
9279 // Include the auto-generated part of this file. We split this because it means | 9282 // Include the auto-generated part of this file. We split this because it means |
9280 // we can easily edit the non-auto generated parts right here in this file | 9283 // we can easily edit the non-auto generated parts right here in this file |
9281 // instead of having to edit some template or the code generator. | 9284 // instead of having to edit some template or the code generator. |
9282 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 9285 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
9283 | 9286 |
9284 } // namespace gles2 | 9287 } // namespace gles2 |
9285 } // namespace gpu | 9288 } // namespace gpu |
OLD | NEW |