GrProcessorUnitTest.cpp 699 B

1234567891011121314151617181920212223242526
  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. #include "src/gpu/GrFragmentProcessor.h"
  8. #include "src/gpu/GrProcessorUnitTest.h"
  9. #if GR_TEST_UTILS
  10. std::unique_ptr<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
  11. #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
  12. std::unique_ptr<GrFragmentProcessor> fp;
  13. do {
  14. fp = GrFragmentProcessorTestFactory::Make(data);
  15. SkASSERT(fp);
  16. } while (fp->numChildProcessors() != 0);
  17. return fp;
  18. #else
  19. SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
  20. return nullptr;
  21. #endif
  22. }
  23. #endif