diff options
author | reed <reed@chromium.org> | 2015-01-22 09:03:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-22 09:03:25 -0800 |
commit | b0dfb546f5e731d2a5da9479f41b00296e1ba082 (patch) | |
tree | 143acb3a72054c0df1c3997ea76bae450fdeb472 /include | |
parent | 50282b4390dcddcf3b1d51631c0133045ae1f233 (diff) |
remove (unused) GatherPixelRefs
BUG=skia:
Review URL: https://codereview.chromium.org/869463002
Diffstat (limited to 'include')
-rw-r--r-- | include/utils/SkPictureUtils.h | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/include/utils/SkPictureUtils.h b/include/utils/SkPictureUtils.h index 80d8b81e1f..10607da9c6 100644 --- a/include/utils/SkPictureUtils.h +++ b/include/utils/SkPictureUtils.h @@ -9,77 +9,10 @@ #define SkPictureUtils_DEFINED #include "SkPicture.h" -#include "SkTDArray.h" - -class SkData; -struct SkRect; class SK_API SkPictureUtils { public: /** - * Given a rectangular visible "window" into the picture, return an array - * of SkPixelRefs that might intersect that area. To keep the call fast, - * the returned list is not guaranteed to be exact, so it may miss some, - * and it may return false positives. - * - * The pixelrefs returned in the SkData are already owned by the picture, - * so the returned pointers are only valid while the picture is in scope - * and remains unchanged. - */ - static SkData* GatherPixelRefs(const SkPicture* pict, const SkRect& area); - - /** - * SkPixelRefContainer provides a base class for more elaborate pixel ref - * query structures (e.g., rtrees, quad-trees, etc.) - */ - class SkPixelRefContainer : public SkRefCnt { - public: - virtual void add(SkPixelRef* pr, const SkRect& rect) = 0; - - // The returned array may contain duplicates - virtual void query(const SkRect& queryRect, SkTDArray<SkPixelRef*> *result) = 0; - - private: - typedef SkRefCnt INHERITED; - }; - - // Simple query structure that just stores a linked list of pixel refs - // and rects. - class SkPixelRefsAndRectsList : public SkPixelRefContainer { - public: - void add(SkPixelRef* pr, const SkRect& rect) SK_OVERRIDE { - PixelRefAndRect *dst = fArray.append(); - - dst->fPixelRef = pr; - dst->fRect = rect; - } - - void query(const SkRect& queryRect, SkTDArray<SkPixelRef*> *result) SK_OVERRIDE { - for (int i = 0; i < fArray.count(); ++i) { - if (SkRect::Intersects(fArray[i].fRect, queryRect)) { - *result->append() = fArray[i].fPixelRef; - } - } - } - - private: - struct PixelRefAndRect { - SkPixelRef* fPixelRef; - SkRect fRect; - }; - - SkTDArray<PixelRefAndRect> fArray; - - typedef SkPixelRefContainer INHERITED; - }; - - /** - * Fill the provided pixel ref container with the picture's pixel ref - * and rect information. - */ - static void GatherPixelRefsAndRects(SkPicture* pict, SkPixelRefContainer* prCont); - - /** * 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 |