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
11#if GR_TEST_UTILS
12
13sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
14#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
15    sk_sp<GrFragmentProcessor> fp;
16    do {
17        fp = GrProcessorTestFactory<GrFragmentProcessor>::Make(data);
18        SkASSERT(fp);
19    } while (fp->numChildProcessors() != 0);
20    return fp;
21#else
22    SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
23    return nullptr;
24#endif
25}
26#endif
27