Home | History | Annotate | Download | only in gpu
      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 
     13 std::unique_ptr<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
     14 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
     15     std::unique_ptr<GrFragmentProcessor> fp;
     16     do {
     17         fp = GrFragmentProcessorTestFactory::Make(data);
     18         SkASSERT(fp);
     19     } while (fp->numChildProcessors() != 0);
     20     return fp;
     21 #else
     22     SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
     23     return nullptr;
     24 #endif
     25 }
     26 #endif
     27