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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 690943004: Fixed bit-testing to use '&' instead of '|', found by /analyze (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index baa51b8c1772f2454557165959e3c72fa5fcdba2..b071737de2573bcf1694f20fe082522d4d001d43 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3125,7 +3125,7 @@ bool GLES2DecoderImpl::CheckFramebufferValid(
state_.SetDeviceDepthMask(GL_TRUE);
state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
bool reset_draw_buffer = false;
- if ((backbuffer_needs_clear_bits_ | GL_COLOR_BUFFER_BIT) != 0 &&
+ if ((backbuffer_needs_clear_bits_ & GL_COLOR_BUFFER_BIT) != 0 &&
group_->draw_buffer() == GL_NONE) {
reset_draw_buffer = true;
GLenum buf = GL_BACK;
@@ -5100,7 +5100,7 @@ void GLES2DecoderImpl::ClearUnclearedAttachments(
state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
glClear(clear_bits);
- if ((clear_bits | GL_COLOR_BUFFER_BIT) != 0 &&
+ if ((clear_bits & GL_COLOR_BUFFER_BIT) != 0 &&
feature_info_->feature_flags().ext_draw_buffers)
framebuffer->RestoreDrawBuffersAfterClear();
« 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