Fix for Chrome MSAN

I believe that the complaints are occurring because the |a| vector
might be uninitialized where it is used here.  It doesn't actually
matter because we won't use or store that value - it's just a
placeholder.

But we need to make the bot happy.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3800

Change-Id: I1891da9d1d2708008e4606daebf9bb6f96e92fc0
Reviewed-on: https://skia-review.googlesource.com/3800
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Matt Sarett 2016-10-21 09:25:54 -04:00 committed by Skia Commit-Bot
parent 54cfe411c6
commit a9f64dec63

View File

@ -581,13 +581,14 @@ static inline void load_rgba_linear(const uint32_t* src,
template <Order kOrder>
static inline void load_rgb_from_tables_1(const uint32_t* src,
Sk4f& r, Sk4f& g, Sk4f& b, Sk4f&,
Sk4f& r, Sk4f& g, Sk4f& b, Sk4f& a,
const float* const srcTables[3]) {
int kRShift, kGShift = 8, kBShift;
set_rb_shifts(kOrder, &kRShift, &kBShift);
r = Sk4f(srcTables[0][(*src >> kRShift) & 0xFF]);
g = Sk4f(srcTables[1][(*src >> kGShift) & 0xFF]);
b = Sk4f(srcTables[2][(*src >> kBShift) & 0xFF]);
a = 0.0f; // Don't let MSAN complain that |a| is uninitialized.
}
template <Order kOrder>
@ -604,13 +605,14 @@ static inline void load_rgba_from_tables_1(const uint32_t* src,
template <Order kOrder>
static inline void load_rgb_linear_1(const uint32_t* src,
Sk4f& r, Sk4f& g, Sk4f& b, Sk4f&,
Sk4f& r, Sk4f& g, Sk4f& b, Sk4f& a,
const float* const srcTables[3]) {
int kRShift, kGShift = 8, kBShift;
set_rb_shifts(kOrder, &kRShift, &kBShift);
r = Sk4f((1.0f / 255.0f) * ((*src >> kRShift) & 0xFF));
g = Sk4f((1.0f / 255.0f) * ((*src >> kGShift) & 0xFF));
b = Sk4f((1.0f / 255.0f) * ((*src >> kBShift) & 0xFF));
a = 0.0f; // Don't let MSAN complain that |a| is uninitialized.
}
template <Order kOrder>