| 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" |
| 12 | |
| 13 | class SkData; |
| 14 | struct SkRect; |
| 15 | |
| djsollen@google.com | fdabcb5 | 2012-12-05 06:15:42 +0000 | [diff] [blame] | 16 | class SK_API SkPictureUtils { |
| reed@google.com | fe7b1ed | 2012-11-29 21:00:39 +0000 | [diff] [blame] | 17 | public: |
| 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 |