| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkBBHFactory_DEFINED | 8 #ifndef SkBBHFactory_DEFINED |
| 9 #define SkBBHFactory_DEFINED | 9 #define SkBBHFactory_DEFINED |
| 10 | 10 |
| 11 #include "SkSize.h" | 11 #include "SkSize.h" |
| 12 #include "SkPoint.h" | 12 #include "SkPoint.h" |
| 13 | 13 |
| 14 class SkBBoxHierarchy; | 14 class SkBBoxHierarchy; |
| 15 | 15 |
| 16 class SK_API SkBBHFactory { | 16 class SK_API SkBBHFactory { |
| 17 public: | 17 public: |
| 18 /** | 18 /** |
| 19 * Allocate a new SkBBoxHierarchy. Return NULL on failure. | 19 * Allocate a new SkBBoxHierarchy. Return NULL on failure. |
| 20 */ | 20 */ |
| 21 virtual SkBBoxHierarchy* operator()(int width, int height) const = 0; | 21 virtual SkBBoxHierarchy* operator()(int width, int height) const = 0; |
| 22 virtual ~SkBBHFactory() {}; | 22 virtual ~SkBBHFactory() {}; |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 class SK_API SkQuadTreeFactory : public SkBBHFactory { | |
| 26 public: | |
| 27 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE
; | |
| 28 private: | |
| 29 typedef SkBBHFactory INHERITED; | |
| 30 }; | |
| 31 | |
| 32 | |
| 33 class SK_API SkRTreeFactory : public SkBBHFactory { | 25 class SK_API SkRTreeFactory : public SkBBHFactory { |
| 34 public: | 26 public: |
| 35 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE
; | 27 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE
; |
| 36 private: | 28 private: |
| 37 typedef SkBBHFactory INHERITED; | 29 typedef SkBBHFactory INHERITED; |
| 38 }; | 30 }; |
| 39 | 31 |
| 40 class SK_API SkTileGridFactory : public SkBBHFactory { | 32 class SK_API SkTileGridFactory : public SkBBHFactory { |
| 41 public: | 33 public: |
| 42 struct TileGridInfo { | 34 struct TileGridInfo { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 60 | 52 |
| 61 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE
; | 53 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE
; |
| 62 | 54 |
| 63 private: | 55 private: |
| 64 TileGridInfo fInfo; | 56 TileGridInfo fInfo; |
| 65 | 57 |
| 66 typedef SkBBHFactory INHERITED; | 58 typedef SkBBHFactory INHERITED; |
| 67 }; | 59 }; |
| 68 | 60 |
| 69 #endif | 61 #endif |
| OLD | NEW |