PathOpsThreadedCommon.cpp 562 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright 2012 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/core/SkTaskGroup.h"
  8. #include "tests/PathOpsExtendedTest.h"
  9. #include "tests/PathOpsThreadedCommon.h"
  10. PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
  11. for (int index = 0; index < fRunnables.count(); index++) {
  12. delete fRunnables[index];
  13. }
  14. }
  15. void PathOpsThreadedTestRunner::render() {
  16. SkTaskGroup().batch(fRunnables.count(), [&](int i) {
  17. (*fRunnables[i])();
  18. });
  19. }