From ca9eeab0eaa32fc8f61be9003fafc3fe1afe78e4 Mon Sep 17 00:00:00 2001 From: dvonbeck Date: Wed, 6 Jul 2016 12:00:06 -0700 Subject: [PATCH] Fixed crash when RunInSeriesFP's color input is nil SeriesFragmentProcessor would call emitChild with "" input color as opposed to nil input color when ginven a nil input color. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2106893003 Review-Url: https://codereview.chromium.org/2106893003 --- src/gpu/GrFragmentProcessor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp index 96a0f71..bad7ebe 100644 --- a/src/gpu/GrFragmentProcessor.cpp +++ b/src/gpu/GrFragmentProcessor.cpp @@ -310,9 +310,11 @@ sk_sp GrFragmentProcessor::RunInSeries(sk_spnumChildProcessors() - 1; ++i) { - SkString temp; + // First guy's input might be nil. + SkString temp("out0"); + this->emitChild(0, args.fInputColor, &temp, args); + SkString input = temp; + for (int i = 1; i < this->numChildProcessors() - 1; ++i) { temp.printf("out%d", i); this->emitChild(i, input.c_str(), &temp, args); input = temp; -- 2.7.4