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 SkQuadTreePicture_DEFINED | 8 #ifndef SkQuadTreePicture_DEFINED |
9 #define SkQuadTreePicture_DEFINED | 9 #define SkQuadTreePicture_DEFINED |
10 | 10 |
11 #include "SkPicture.h" | 11 #ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS |
12 | 12 #include "SkBBHFactory.h" |
13 class SkQuadTreeFactory : public SkBBHFactory { | 13 #endif |
14 public: | |
15 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE
; | |
16 private: | |
17 typedef SkBBHFactory INHERITED; | |
18 }; | |
19 | 14 |
20 #ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES | 15 #ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES |
21 | 16 |
| 17 #include "SkPicture.h" |
22 #include "SkRect.h" | 18 #include "SkRect.h" |
23 | 19 |
24 /** | 20 /** |
25 * Subclass of SkPicture that creates an SkQuadGrid | 21 * Subclass of SkPicture that creates an SkQuadGrid |
26 * structure. The quad tree has generally faster | 22 * structure. The quad tree has generally faster |
27 * tree creation time, but slightly slower query times, as compared to | 23 * tree creation time, but slightly slower query times, as compared to |
28 * R-Tree, so some cases may be faster and some cases slower. | 24 * R-Tree, so some cases may be faster and some cases slower. |
29 */ | 25 */ |
30 class SK_API SkQuadTreePicture : public SkPicture { | 26 class SK_API SkQuadTreePicture : public SkPicture { |
31 public: | 27 public: |
(...skipping 13 matching lines...) Expand all Loading... |
45 return SkNEW_ARGS(SkQuadTreePicture, (SkIRect::MakeWH(width, height))); | 41 return SkNEW_ARGS(SkQuadTreePicture, (SkIRect::MakeWH(width, height))); |
46 } | 42 } |
47 | 43 |
48 private: | 44 private: |
49 typedef SkPictureFactory INHERITED; | 45 typedef SkPictureFactory INHERITED; |
50 }; | 46 }; |
51 | 47 |
52 #endif | 48 #endif |
53 | 49 |
54 #endif | 50 #endif |
OLD | NEW |