| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2780 offscreen_resolved_frame_buffer_.reset(); | 2780 offscreen_resolved_frame_buffer_.reset(); |
| 2781 | 2781 |
| 2782 return true; | 2782 return true; |
| 2783 } | 2783 } |
| 2784 | 2784 |
| 2785 error::Error GLES2DecoderImpl::HandleResizeCHROMIUM( | 2785 error::Error GLES2DecoderImpl::HandleResizeCHROMIUM( |
| 2786 uint32 immediate_data_size, const gles2::ResizeCHROMIUM& c) { | 2786 uint32 immediate_data_size, const gles2::ResizeCHROMIUM& c) { |
| 2787 GLuint width = static_cast<GLuint>(c.width); | 2787 GLuint width = static_cast<GLuint>(c.width); |
| 2788 GLuint height = static_cast<GLuint>(c.height); | 2788 GLuint height = static_cast<GLuint>(c.height); |
| 2789 TRACE_EVENT2("gpu", "glResizeChromium", "width", width, "height", height); | 2789 TRACE_EVENT2("gpu", "glResizeChromium", "width", width, "height", height); |
| 2790 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOUCH_UI) | 2790 #if defined(OS_POSIX) && !defined(OS_MACOSX) && \ |
| 2791 !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 2791 // Make sure that we are done drawing to the back buffer before resizing. | 2792 // Make sure that we are done drawing to the back buffer before resizing. |
| 2792 glFinish(); | 2793 glFinish(); |
| 2793 #endif | 2794 #endif |
| 2794 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); | 2795 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); |
| 2795 if (is_offscreen) { | 2796 if (is_offscreen) { |
| 2796 if (!ResizeOffscreenFrameBuffer(gfx::Size(width, height))) | 2797 if (!ResizeOffscreenFrameBuffer(gfx::Size(width, height))) |
| 2797 return error::kLostContext; | 2798 return error::kLostContext; |
| 2798 } | 2799 } |
| 2799 | 2800 |
| 2800 if (!resize_callback_.is_null()) { | 2801 if (!resize_callback_.is_null()) { |
| (...skipping 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7485 return error::kNoError; | 7486 return error::kNoError; |
| 7486 } | 7487 } |
| 7487 | 7488 |
| 7488 // Include the auto-generated part of this file. We split this because it means | 7489 // Include the auto-generated part of this file. We split this because it means |
| 7489 // we can easily edit the non-auto generated parts right here in this file | 7490 // we can easily edit the non-auto generated parts right here in this file |
| 7490 // instead of having to edit some template or the code generator. | 7491 // instead of having to edit some template or the code generator. |
| 7491 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7492 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 7492 | 7493 |
| 7493 } // namespace gles2 | 7494 } // namespace gles2 |
| 7494 } // namespace gpu | 7495 } // namespace gpu |
| OLD | NEW |