Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1107683002: Fix GL error occuring on pbuffer surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't enable double buffering, just don't execute problematic part when we don't need to Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698