OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkTileGridPicture_DEFINED | 8 #ifndef SkTileGridPicture_DEFINED |
9 #define SkTileGridPicture_DEFINED | 9 #define SkTileGridPicture_DEFINED |
10 | 10 |
11 #include "SkPicture.h" | 11 #include "SkPicture.h" |
12 #include "SkPoint.h" | 12 #include "SkPoint.h" |
13 #include "SkSize.h" | 13 #include "SkSize.h" |
14 | 14 |
15 /** | 15 /** |
16 * Subclass of SkPicture that override the behavior of the | 16 * Subclass of SkPicture that creates an SkTileGrid. The tile grid has lower rec
ording |
17 * kOptimizeForClippedPlayback_RecordingFlag by creating an SkTileGrid | 17 * and playback costs then rTree, but is less effective at eliminating extraneou
s |
18 * structure rather than an R-Tree. The tile grid has lower recording | |
19 * and playback costs, but is less effective at eliminating extraneous | |
20 * primitives for arbitrary query rectangles. It is most effective for | 18 * primitives for arbitrary query rectangles. It is most effective for |
21 * tiled playback when the tile structure is known at record time. | 19 * tiled playback when the tile structure is known at record time. |
22 */ | 20 */ |
23 class SK_API SkTileGridPicture : public SkPicture { | 21 class SK_API SkTileGridPicture : public SkPicture { |
24 public: | 22 public: |
25 struct TileGridInfo { | 23 struct TileGridInfo { |
26 /** Tile placement interval */ | 24 /** Tile placement interval */ |
27 SkISize fTileInterval; | 25 SkISize fTileInterval; |
28 | 26 |
29 /** Pixel coverage overlap between adjacent tiles */ | 27 /** Pixel coverage overlap between adjacent tiles */ |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 62 } |
65 | 63 |
66 protected: | 64 protected: |
67 SkTileGridPicture::TileGridInfo fInfo; | 65 SkTileGridPicture::TileGridInfo fInfo; |
68 | 66 |
69 private: | 67 private: |
70 typedef SkPictureFactory INHERITED; | 68 typedef SkPictureFactory INHERITED; |
71 }; | 69 }; |
72 | 70 |
73 #endif | 71 #endif |
OLD | NEW |