| 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 4245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4256 GetBackbufferServiceId()); | 4256 GetBackbufferServiceId()); |
| 4257 } | 4257 } |
| 4258 OnFboChanged(); | 4258 OnFboChanged(); |
| 4259 } | 4259 } |
| 4260 | 4260 |
| 4261 bool GLES2DecoderImpl::CheckFramebufferValid( | 4261 bool GLES2DecoderImpl::CheckFramebufferValid( |
| 4262 Framebuffer* framebuffer, | 4262 Framebuffer* framebuffer, |
| 4263 GLenum target, | 4263 GLenum target, |
| 4264 GLenum gl_error, | 4264 GLenum gl_error, |
| 4265 const char* func_name) { | 4265 const char* func_name) { |
| 4266 SCOPED_UMA_HISTOGRAM_TIMER("GPU.CheckFramebufferValidDuration"); | |
| 4267 | |
| 4268 if (!framebuffer) { | 4266 if (!framebuffer) { |
| 4269 if (surfaceless_) | 4267 if (surfaceless_) |
| 4270 return false; | 4268 return false; |
| 4271 if (backbuffer_needs_clear_bits_) { | 4269 if (backbuffer_needs_clear_bits_) { |
| 4272 glClearColor(0, 0, 0, BackBufferAlphaClearColor()); | 4270 glClearColor(0, 0, 0, BackBufferAlphaClearColor()); |
| 4273 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | 4271 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); |
| 4274 glClearStencil(0); | 4272 glClearStencil(0); |
| 4275 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); | 4273 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); |
| 4276 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); | 4274 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); |
| 4277 glClearDepth(1.0f); | 4275 glClearDepth(1.0f); |
| (...skipping 14840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19118 } | 19116 } |
| 19119 | 19117 |
| 19120 // Include the auto-generated part of this file. We split this because it means | 19118 // Include the auto-generated part of this file. We split this because it means |
| 19121 // we can easily edit the non-auto generated parts right here in this file | 19119 // we can easily edit the non-auto generated parts right here in this file |
| 19122 // instead of having to edit some template or the code generator. | 19120 // instead of having to edit some template or the code generator. |
| 19123 #include "base/macros.h" | 19121 #include "base/macros.h" |
| 19124 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19122 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 19125 | 19123 |
| 19126 } // namespace gles2 | 19124 } // namespace gles2 |
| 19127 } // namespace gpu | 19125 } // namespace gpu |
| OLD | NEW |