From 73a850fe5db820b548d61741191d5ed966d3914b Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 27 Mar 2017 10:17:38 -0400 Subject: Fully initialize array of previous edges in GrGLConvexPolyEffect to please MSAN BUG=skia:6416 Change-Id: I99c29cd8cb90844e50ed288ba57e28774bf2444c Reviewed-on: https://skia-review.googlesource.com/10183 Reviewed-by: Robert Phillips Commit-Queue: Brian Salomon --- src/gpu/effects/GrConvexPolyEffect.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gpu') diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp index d07d591c69..d94d94a29a 100644 --- a/src/gpu/effects/GrConvexPolyEffect.cpp +++ b/src/gpu/effects/GrConvexPolyEffect.cpp @@ -166,7 +166,9 @@ GrGLSLFragmentProcessor* AARectEffect::onCreateGLSLInstance() const { class GrGLConvexPolyEffect : public GrGLSLFragmentProcessor { public: GrGLConvexPolyEffect() { - fPrevEdges[0] = SK_ScalarNaN; + for (size_t i = 0; i < SK_ARRAY_COUNT(fPrevEdges); ++i) { + fPrevEdges[i] = SK_ScalarNaN; + } } void emitCode(EmitArgs&) override; -- cgit v1.2.3