SkBBHFactory.h 647 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright 2014 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. #ifndef SkBBHFactory_DEFINED
  8. #define SkBBHFactory_DEFINED
  9. #include "include/core/SkTypes.h"
  10. class SkBBoxHierarchy;
  11. struct SkRect;
  12. class SK_API SkBBHFactory {
  13. public:
  14. /**
  15. * Allocate a new SkBBoxHierarchy. Return NULL on failure.
  16. */
  17. virtual SkBBoxHierarchy* operator()() const = 0;
  18. virtual ~SkBBHFactory() {}
  19. };
  20. class SK_API SkRTreeFactory : public SkBBHFactory {
  21. public:
  22. SkBBoxHierarchy* operator()() const override;
  23. private:
  24. typedef SkBBHFactory INHERITED;
  25. };
  26. #endif