| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <vector> | 10 #include <vector> |
| (...skipping 3644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3655 } | 3655 } |
| 3656 service_ids[ii] = info->service_id(); | 3656 service_ids[ii] = info->service_id(); |
| 3657 } | 3657 } |
| 3658 // TODO(gman): call glShaderBinary | 3658 // TODO(gman): call glShaderBinary |
| 3659 return error::kNoError; | 3659 return error::kNoError; |
| 3660 #endif | 3660 #endif |
| 3661 } | 3661 } |
| 3662 | 3662 |
| 3663 error::Error GLES2DecoderImpl::HandleSwapBuffers( | 3663 error::Error GLES2DecoderImpl::HandleSwapBuffers( |
| 3664 uint32 immediate_data_size, const gles2::SwapBuffers& c) { | 3664 uint32 immediate_data_size, const gles2::SwapBuffers& c) { |
| 3665 // Check a client created frame buffer is not bound. TODO(apatrick): | |
| 3666 // this error is overkill. It will require that the client recreate the | |
| 3667 // context to continue. | |
| 3668 if (bound_framebuffer_) | |
| 3669 return error::kLostContext; | |
| 3670 | |
| 3671 // If offscreen then don't actually SwapBuffers to the display. Just copy | 3665 // If offscreen then don't actually SwapBuffers to the display. Just copy |
| 3672 // the rendered frame to another frame buffer. | 3666 // the rendered frame to another frame buffer. |
| 3673 if (offscreen_target_frame_buffer_.get()) { | 3667 if (offscreen_target_frame_buffer_.get()) { |
| 3674 ScopedGLErrorSuppressor suppressor(this); | 3668 ScopedGLErrorSuppressor suppressor(this); |
| 3675 | 3669 |
| 3676 // First check to see if a deferred offscreen render buffer resize is | 3670 // First check to see if a deferred offscreen render buffer resize is |
| 3677 // pending. | 3671 // pending. |
| 3678 if (!UpdateOffscreenFrameBufferSize()) | 3672 if (!UpdateOffscreenFrameBufferSize()) |
| 3679 return error::kLostContext; | 3673 return error::kLostContext; |
| 3680 | 3674 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3702 return error::kNoError; | 3696 return error::kNoError; |
| 3703 } | 3697 } |
| 3704 | 3698 |
| 3705 // Include the auto-generated part of this file. We split this because it means | 3699 // Include the auto-generated part of this file. We split this because it means |
| 3706 // we can easily edit the non-auto generated parts right here in this file | 3700 // we can easily edit the non-auto generated parts right here in this file |
| 3707 // instead of having to edit some template or the code generator. | 3701 // instead of having to edit some template or the code generator. |
| 3708 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 3702 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 3709 | 3703 |
| 3710 } // namespace gles2 | 3704 } // namespace gles2 |
| 3711 } // namespace gpu | 3705 } // namespace gpu |
| OLD | NEW |