reed@google.com | fe7b1ed | 2012-11-29 21:00:39 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 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 SkPictureUtils_DEFINED |
| 9 | #define SkPictureUtils_DEFINED |
| 10 | |
| 11 | #include "SkPicture.h" |
reed@google.com | fe7b1ed | 2012-11-29 21:00:39 +0000 | [diff] [blame] | 12 | |
mtklein | 9db912c | 2015-05-19 11:11:26 -0700 | [diff] [blame] | 13 | // TODO: remove this file? |
| 14 | |
djsollen@google.com | fdabcb5 | 2012-12-05 06:15:42 +0000 | [diff] [blame] | 15 | class SK_API SkPictureUtils { |
reed@google.com | fe7b1ed | 2012-11-29 21:00:39 +0000 | [diff] [blame] | 16 | public: |
| 17 | /** |
tomhudson | 158fcaa | 2014-11-19 10:41:14 -0800 | [diff] [blame] | 18 | * How many bytes are allocated to hold the SkPicture. |
| 19 | * Includes operations, parameters, bounding data, deletion listeners; |
| 20 | * includes nested SkPictures, but does not include large objects that |
| 21 | * SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps). |
| 22 | */ |
mtklein | 9db912c | 2015-05-19 11:11:26 -0700 | [diff] [blame] | 23 | static size_t ApproximateBytesUsed(const SkPicture* pict) { |
| 24 | return pict->approximateBytesUsed(); |
| 25 | } |
reed@google.com | fe7b1ed | 2012-11-29 21:00:39 +0000 | [diff] [blame] | 26 | }; |
| 27 | |
| 28 | #endif |