aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkPictureUtils.h
blob: b65a64d57924fa39f7e4b5472e86883fdcb77036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkPictureUtils_DEFINED
#define SkPictureUtils_DEFINED

#include "SkPicture.h"

// TODO: remove this file?

class SK_API SkPictureUtils {
public:
    /**
     *  How many bytes are allocated to hold the SkPicture.
     *  Includes operations, parameters, bounding data, deletion listeners;
     *  includes nested SkPictures, but does not include large objects that
     *  SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps).
     */
    static size_t ApproximateBytesUsed(const SkPicture* pict) {
        return pict->approximateBytesUsed();
    }
};

#endif