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

Unified Diff: src/gpu/GrDrawState.cpp

Issue 12313150: Assign color=0 in GrDrawState.cpp to stop tools from raising false alarms about uninit reads. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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: src/gpu/GrDrawState.cpp
===================================================================
--- src/gpu/GrDrawState.cpp (revision 7872)
+++ src/gpu/GrDrawState.cpp (working copy)
@@ -318,10 +318,11 @@
bool GrDrawState::srcAlphaWillBeOne(GrVertexLayout layout) const {
uint32_t validComponentFlags;
- GrColor color;
+ GrColor color;
// Check if per-vertex or constant color may have partial alpha
if (layout & kColor_VertexLayoutBit) {
validComponentFlags = 0;
+ color = 0; // not strictly necessary but we get false alarms from tools about uninit.
} else {
validComponentFlags = GrEffect::kAll_ValidComponentFlags;
color = this->getColor();
« 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