OLD | NEW |
| (Empty) |
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 | |
8 #ifndef SkRTreePicture_DEFINED | |
9 #define SkRTreePicture_DEFINED | |
10 | |
11 #ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS | |
12 #include "SkBBHFactory.h" | |
13 #endif | |
14 | |
15 #ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES | |
16 | |
17 #include "SkPicture.h" | |
18 | |
19 /** | |
20 * Subclass of SkPicture that creates an RTree acceleration structure. | |
21 */ | |
22 class SkRTreePicture : public SkPicture { | |
23 public: | |
24 virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; | |
25 | |
26 private: | |
27 typedef SkPicture INHERITED; | |
28 }; | |
29 | |
30 class SkRTreePictureFactory : public SkPictureFactory { | |
31 public: | |
32 SkRTreePictureFactory() {} | |
33 | |
34 virtual SkPicture* create(int width, int height) SK_OVERRIDE { | |
35 return SkNEW(SkRTreePicture); | |
36 } | |
37 | |
38 private: | |
39 typedef SkPictureFactory INHERITED; | |
40 }; | |
41 #endif | |
42 | |
43 #endif | |
OLD | NEW |