| 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 SkPictureUtils_DEFINED | 8 #ifndef SkPictureUtils_DEFINED |
| 9 #define SkPictureUtils_DEFINED | 9 #define SkPictureUtils_DEFINED |
| 10 | 10 |
| 11 #include "SkPicture.h" | 11 #include "SkPicture.h" |
| 12 | 12 |
| 13 // TODO: remove this file? |
| 14 |
| 13 class SK_API SkPictureUtils { | 15 class SK_API SkPictureUtils { |
| 14 public: | 16 public: |
| 15 /** | 17 /** |
| 16 * How many bytes are allocated to hold the SkPicture. | 18 * How many bytes are allocated to hold the SkPicture. |
| 17 * Includes operations, parameters, bounding data, deletion listeners; | 19 * Includes operations, parameters, bounding data, deletion listeners; |
| 18 * includes nested SkPictures, but does not include large objects that | 20 * includes nested SkPictures, but does not include large objects that |
| 19 * SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps). | 21 * SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps). |
| 20 */ | 22 */ |
| 21 static size_t ApproximateBytesUsed(const SkPicture* pict); | 23 static size_t ApproximateBytesUsed(const SkPicture* pict) { |
| 24 return pict->approximateBytesUsed(); |
| 25 } |
| 22 }; | 26 }; |
| 23 | 27 |
| 24 #endif | 28 #endif |
| OLD | NEW |