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

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

Issue 2129523004: Fix a bug with emulated RGB offscreen native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | gpu/command_buffer/tests/gl_native_gmb_backbuffer_unittest.cc » ('j') | 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 <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 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after
3346 // Set all the default state because some GL drivers get it wrong. 3346 // Set all the default state because some GL drivers get it wrong.
3347 state_.InitCapabilities(NULL); 3347 state_.InitCapabilities(NULL);
3348 state_.InitState(NULL); 3348 state_.InitState(NULL);
3349 glActiveTexture(GL_TEXTURE0 + state_.active_texture_unit); 3349 glActiveTexture(GL_TEXTURE0 + state_.active_texture_unit);
3350 3350
3351 DoBindBuffer(GL_ARRAY_BUFFER, 0); 3351 DoBindBuffer(GL_ARRAY_BUFFER, 0);
3352 DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 3352 DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
3353 DoBindFramebuffer(GL_FRAMEBUFFER, 0); 3353 DoBindFramebuffer(GL_FRAMEBUFFER, 0);
3354 DoBindRenderbuffer(GL_RENDERBUFFER, 0); 3354 DoBindRenderbuffer(GL_RENDERBUFFER, 0);
3355 3355
3356 bool call_gl_clear = !surfaceless_; 3356 bool call_gl_clear = !surfaceless_ && !offscreen;
3357 #if defined(OS_ANDROID) 3357 #if defined(OS_ANDROID)
3358 // Temporary workaround for Android WebView because this clear ignores the 3358 // Temporary workaround for Android WebView because this clear ignores the
3359 // clip and corrupts that external UI of the App. Not calling glClear is ok 3359 // clip and corrupts that external UI of the App. Not calling glClear is ok
3360 // because the system already clears the buffer before each draw. Proper 3360 // because the system already clears the buffer before each draw. Proper
3361 // fix might be setting the scissor clip properly before initialize. See 3361 // fix might be setting the scissor clip properly before initialize. See
3362 // crbug.com/259023 for details. 3362 // crbug.com/259023 for details.
3363 call_gl_clear = surface_->GetHandle(); 3363 call_gl_clear = surface_->GetHandle();
3364 #endif 3364 #endif
3365 if (call_gl_clear) { 3365 if (call_gl_clear) {
3366 // On configs where we report no alpha, if the underlying surface has 3366 // On configs where we report no alpha, if the underlying surface has
(...skipping 13721 matching lines...) Expand 10 before | Expand all | Expand 10 after
17088 } 17088 }
17089 17089
17090 // Include the auto-generated part of this file. We split this because it means 17090 // Include the auto-generated part of this file. We split this because it means
17091 // we can easily edit the non-auto generated parts right here in this file 17091 // we can easily edit the non-auto generated parts right here in this file
17092 // instead of having to edit some template or the code generator. 17092 // instead of having to edit some template or the code generator.
17093 #include "base/macros.h" 17093 #include "base/macros.h"
17094 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 17094 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
17095 17095
17096 } // namespace gles2 17096 } // namespace gles2
17097 } // namespace gpu 17097 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/tests/gl_native_gmb_backbuffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698