Chromium Code Reviews| 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 <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 6984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6995 glFramebufferRenderbufferEXT( | 6995 glFramebufferRenderbufferEXT( |
| 6996 target, GL_DEPTH_ATTACHMENT, renderbuffertarget, service_id); | 6996 target, GL_DEPTH_ATTACHMENT, renderbuffertarget, service_id); |
| 6997 glFramebufferRenderbufferEXT( | 6997 glFramebufferRenderbufferEXT( |
| 6998 target, GL_STENCIL_ATTACHMENT, renderbuffertarget, service_id); | 6998 target, GL_STENCIL_ATTACHMENT, renderbuffertarget, service_id); |
| 6999 } else { | 6999 } else { |
| 7000 glFramebufferRenderbufferEXT( | 7000 glFramebufferRenderbufferEXT( |
| 7001 target, attachment, renderbuffertarget, service_id); | 7001 target, attachment, renderbuffertarget, service_id); |
| 7002 } | 7002 } |
| 7003 GLenum error = LOCAL_PEEK_GL_ERROR("glFramebufferRenderbuffer"); | 7003 GLenum error = LOCAL_PEEK_GL_ERROR("glFramebufferRenderbuffer"); |
| 7004 if (error == GL_NO_ERROR) { | 7004 if (error == GL_NO_ERROR) { |
| 7005 framebuffer->AttachRenderbuffer(attachment, renderbuffer); | 7005 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { |
|
Zhenyao Mo
2016/07/20 20:28:10
You will need to do the same in DoFramebufferTextu
| |
| 7006 framebuffer->AttachRenderbuffer(GL_DEPTH_ATTACHMENT, renderbuffer); | |
| 7007 framebuffer->AttachRenderbuffer(GL_STENCIL_ATTACHMENT, renderbuffer); | |
| 7008 } else { | |
| 7009 framebuffer->AttachRenderbuffer(attachment, renderbuffer); | |
| 7010 } | |
| 7006 } | 7011 } |
| 7007 if (framebuffer == framebuffer_state_.bound_draw_framebuffer.get()) { | 7012 if (framebuffer == framebuffer_state_.bound_draw_framebuffer.get()) { |
| 7008 framebuffer_state_.clear_state_dirty = true; | 7013 framebuffer_state_.clear_state_dirty = true; |
| 7009 } | 7014 } |
| 7010 OnFboChanged(); | 7015 OnFboChanged(); |
| 7011 } | 7016 } |
| 7012 | 7017 |
| 7013 void GLES2DecoderImpl::DoDisable(GLenum cap) { | 7018 void GLES2DecoderImpl::DoDisable(GLenum cap) { |
| 7014 if (SetCapabilityState(cap, false)) { | 7019 if (SetCapabilityState(cap, false)) { |
| 7015 if (cap == GL_PRIMITIVE_RESTART_FIXED_INDEX && | 7020 if (cap == GL_PRIMITIVE_RESTART_FIXED_INDEX && |
| (...skipping 10439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 17455 } | 17460 } |
| 17456 | 17461 |
| 17457 // Include the auto-generated part of this file. We split this because it means | 17462 // Include the auto-generated part of this file. We split this because it means |
| 17458 // we can easily edit the non-auto generated parts right here in this file | 17463 // we can easily edit the non-auto generated parts right here in this file |
| 17459 // instead of having to edit some template or the code generator. | 17464 // instead of having to edit some template or the code generator. |
| 17460 #include "base/macros.h" | 17465 #include "base/macros.h" |
| 17461 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17466 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 17462 | 17467 |
| 17463 } // namespace gles2 | 17468 } // namespace gles2 |
| 17464 } // namespace gpu | 17469 } // namespace gpu |
| OLD | NEW |