1 /* 2 * Copyright 2015 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "GrProcessorUnitTest.h" 9 #include "GrFragmentProcessor.h" 10 MakeChildFP(GrProcessorTestData * data)11sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) { 12 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 13 sk_sp<GrFragmentProcessor> fp; 14 do { 15 fp = GrProcessorTestFactory<GrFragmentProcessor>::Make(data); 16 SkASSERT(fp); 17 } while (fp->numChildProcessors() != 0); 18 return fp; 19 #else 20 SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS"); 21 return nullptr; 22 #endif 23 } 24