blob: 56318cdb70fdf817cdd17c3eeafa8ac177c6fa20 [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"
12
13class SkData;
14struct SkRect;
15
16class SkPictureUtils {
17public:
18 /**
19 * Given a rectangular visible "window" into the picture, return an array
20 * of SkPixelRefs that might intersect that area. To keep the call fast,
21 * the returned list is not guaranteed to be exact, so it may miss some,
22 * and it may return false positives.
23 *
24 * The pixelrefs returned in the SkData are already owned by the picture,
25 * so the returned pointers are only valid while the picture is in scope
26 * and remains unchanged.
27 */
28 static SkData* GatherPixelRefs(SkPicture* pict, const SkRect& area);
29};
30
31#endif