Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: include/utils/SkPictureUtils.h

Issue 377623002: Split SkPicturePlayback out of SkPictureData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add virtual dtor for SkPicturePlayback Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPictureUtils_DEFINED 8 #ifndef SkPictureUtils_DEFINED
9 #define SkPictureUtils_DEFINED 9 #define SkPictureUtils_DEFINED
10 10
11 #include "SkPicture.h" 11 #include "SkPicture.h"
12 #include "SkTDArray.h" 12 #include "SkTDArray.h"
13 13
14 class SkData; 14 class SkData;
15 struct SkRect; 15 struct SkRect;
16 16
17 class SK_API SkPictureUtils { 17 class SK_API SkPictureUtils {
18 public: 18 public:
19 /** 19 /**
20 * Given a rectangular visible "window" into the picture, return an array 20 * Given a rectangular visible "window" into the picture, return an array
21 * of SkPixelRefs that might intersect that area. To keep the call fast, 21 * of SkPixelRefs that might intersect that area. To keep the call fast,
22 * the returned list is not guaranteed to be exact, so it may miss some, 22 * the returned list is not guaranteed to be exact, so it may miss some,
23 * and it may return false positives. 23 * and it may return false positives.
24 * 24 *
25 * The pixelrefs returned in the SkData are already owned by the picture, 25 * The pixelrefs returned in the SkData are already owned by the picture,
26 * so the returned pointers are only valid while the picture is in scope 26 * so the returned pointers are only valid while the picture is in scope
27 * and remains unchanged. 27 * and remains unchanged.
28 */ 28 */
29 static SkData* GatherPixelRefs(SkPicture* pict, const SkRect& area); 29 static SkData* GatherPixelRefs(const SkPicture* pict, const SkRect& area);
30 30
31 /** 31 /**
32 * SkPixelRefContainer provides a base class for more elaborate pixel ref 32 * SkPixelRefContainer provides a base class for more elaborate pixel ref
33 * query structures (e.g., rtrees, quad-trees, etc.) 33 * query structures (e.g., rtrees, quad-trees, etc.)
34 */ 34 */
35 class SkPixelRefContainer : public SkRefCnt { 35 class SkPixelRefContainer : public SkRefCnt {
36 public: 36 public:
37 virtual void add(SkPixelRef* pr, const SkRect& rect) = 0; 37 virtual void add(SkPixelRef* pr, const SkRect& rect) = 0;
38 38
39 // The returned array may contain duplicates 39 // The returned array may contain duplicates
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }; 74 };
75 75
76 /** 76 /**
77 * Fill the provided pixel ref container with the picture's pixel ref 77 * Fill the provided pixel ref container with the picture's pixel ref
78 * and rect information. 78 * and rect information.
79 */ 79 */
80 static void GatherPixelRefsAndRects(SkPicture* pict, SkPixelRefContainer* pr Cont); 80 static void GatherPixelRefsAndRects(SkPicture* pict, SkPixelRefContainer* pr Cont);
81 }; 81 };
82 82
83 #endif 83 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698