blob: b65a64d57924fa39f7e4b5472e86883fdcb77036 [file] [log] [blame]
reed@google.comfe7b1ed2012-11-29 21:00:39 +00001/*
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.comfe7b1ed2012-11-29 21:00:39 +000012
mtklein9db912c2015-05-19 11:11:26 -070013// TODO: remove this file?
14
djsollen@google.comfdabcb52012-12-05 06:15:42 +000015class SK_API SkPictureUtils {
reed@google.comfe7b1ed2012-11-29 21:00:39 +000016public:
17 /**
tomhudson158fcaa2014-11-19 10:41:14 -080018 * 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 */
mtklein9db912c2015-05-19 11:11:26 -070023 static size_t ApproximateBytesUsed(const SkPicture* pict) {
24 return pict->approximateBytesUsed();
25 }
reed@google.comfe7b1ed2012-11-29 21:00:39 +000026};
27
28#endif