Home | History | Annotate | Download | only in utils
      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 
     16 class SK_API SkPictureUtils {
     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
     32