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 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 DoBindFramebuffer(GL_FRAMEBUFFER, 0); | 2730 DoBindFramebuffer(GL_FRAMEBUFFER, 0); |
2731 } else { | 2731 } else { |
2732 glBindFramebufferEXT(GL_FRAMEBUFFER, GetBackbufferServiceId()); | 2732 glBindFramebufferEXT(GL_FRAMEBUFFER, GetBackbufferServiceId()); |
2733 // These are NOT if the back buffer has these proprorties. They are | 2733 // These are NOT if the back buffer has these proprorties. They are |
2734 // if we want the command buffer to enforce them regardless of what | 2734 // if we want the command buffer to enforce them regardless of what |
2735 // the real backbuffer is assuming the real back buffer gives us more than | 2735 // the real backbuffer is assuming the real back buffer gives us more than |
2736 // we ask for. In other words, if we ask for RGB and we get RGBA then we'll | 2736 // we ask for. In other words, if we ask for RGB and we get RGBA then we'll |
2737 // make it appear RGB. If on the other hand we ask for RGBA nd get RGB we | 2737 // make it appear RGB. If on the other hand we ask for RGBA nd get RGB we |
2738 // can't do anything about that. | 2738 // can't do anything about that. |
2739 | 2739 |
2740 if (!surfaceless_) { | 2740 if (!surfaceless_ && !surface_->IsOffscreen()) { |
2741 GLint alpha_bits = 0; | 2741 GLint alpha_bits = 0; |
2742 GLint depth_bits = 0; | 2742 GLint depth_bits = 0; |
2743 GLint stencil_bits = 0; | 2743 GLint stencil_bits = 0; |
2744 | 2744 |
2745 bool default_fb = (GetBackbufferServiceId() == 0); | 2745 bool default_fb = (GetBackbufferServiceId() == 0); |
2746 | 2746 |
2747 if (feature_info_->gl_version_info().is_desktop_core_profile) { | 2747 if (feature_info_->gl_version_info().is_desktop_core_profile) { |
2748 glGetFramebufferAttachmentParameterivEXT( | 2748 glGetFramebufferAttachmentParameterivEXT( |
2749 GL_FRAMEBUFFER, | 2749 GL_FRAMEBUFFER, |
2750 default_fb ? GL_BACK_LEFT : GL_COLOR_ATTACHMENT0, | 2750 default_fb ? GL_BACK_LEFT : GL_COLOR_ATTACHMENT0, |
(...skipping 9870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12621 } | 12621 } |
12622 } | 12622 } |
12623 | 12623 |
12624 // Include the auto-generated part of this file. We split this because it means | 12624 // Include the auto-generated part of this file. We split this because it means |
12625 // we can easily edit the non-auto generated parts right here in this file | 12625 // we can easily edit the non-auto generated parts right here in this file |
12626 // instead of having to edit some template or the code generator. | 12626 // instead of having to edit some template or the code generator. |
12627 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 12627 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
12628 | 12628 |
12629 } // namespace gles2 | 12629 } // namespace gles2 |
12630 } // namespace gpu | 12630 } // namespace gpu |
OLD | NEW |