2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef SkBBHFactory_DEFINED
9 #define SkBBHFactory_DEFINED
13 class SkBBoxHierarchy;
15 class SK_API SkBBHFactory {
18 * Allocate a new SkBBoxHierarchy. Return NULL on failure.
20 virtual SkBBoxHierarchy* operator()(const SkRect& bounds) const = 0;
21 virtual ~SkBBHFactory() {};
24 class SK_API SkRTreeFactory : public SkBBHFactory {
26 SkBBoxHierarchy* operator()(const SkRect& bounds) const SK_OVERRIDE;
28 typedef SkBBHFactory INHERITED;