diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-27 18:43:47 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-27 18:43:47 +0000 |
commit | 89e6f5bacf09333cdb0111bc7d18afdb2cfa8206 (patch) | |
tree | e159be6f75bd0d9cf03aa7907eb16d9917a186fe /src | |
parent | 29b19e53cfac5af4f9bd5d361436d1097f349a34 (diff) |
Assign color=0 in GrDrawState.cpp to stop tools from raising false alarms about uninit reads.
We were assigning color to oldColor but it in turn would never be read because the valid flags
would be cleared.
R=jvanverth@google.com
Review URL: https://codereview.chromium.org/12313150
git-svn-id: http://skia.googlecode.com/svn/trunk@7886 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawState.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp index 8c74c4a4bd..3925bd9a91 100644 --- a/src/gpu/GrDrawState.cpp +++ b/src/gpu/GrDrawState.cpp @@ -318,10 +318,11 @@ bool GrDrawState::StageUsesTexCoords(GrVertexLayout layout, int stageIdx) { 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(); |