| 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 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 * @param height recording canvas height in device pixels | 44 * @param height recording canvas height in device pixels |
| 45 * @param info description of the tiling layout | 45 * @param info description of the tiling layout |
| 46 */ | 46 */ |
| 47 SkTileGridPicture(int width, int height, const TileGridInfo& info); | 47 SkTileGridPicture(int width, int height, const TileGridInfo& info); |
| 48 | 48 |
| 49 virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; | 49 virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 int fXTileCount, fYTileCount; | 52 int fXTileCount, fYTileCount; |
| 53 TileGridInfo fInfo; | 53 TileGridInfo fInfo; |
| 54 |
| 55 typedef SkPicture INHERITED; |
| 56 }; |
| 57 |
| 58 class SkTileGridPictureFactory : public SkPictureFactory { |
| 59 public: |
| 60 SkTileGridPictureFactory(const SkTileGridPicture::TileGridInfo& info) : fInf
o(info) { } |
| 61 |
| 62 virtual SkPicture* create(int width, int height) SK_OVERRIDE { |
| 63 return SkNEW_ARGS(SkTileGridPicture, (width, height, fInfo)); |
| 64 } |
| 65 |
| 66 protected: |
| 67 SkTileGridPicture::TileGridInfo fInfo; |
| 68 |
| 69 private: |
| 70 typedef SkPictureFactory INHERITED; |
| 54 }; | 71 }; |
| 55 | 72 |
| 56 #endif | 73 #endif |
| OLD | NEW |