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 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/utils/SkNWayCanvas.h ('k') | include/utils/SkProxyCanvas.h » ('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
(...skipping 29 matching lines...) Expand all
40 virtual void query(const SkRect& queryRect, SkTDArray<SkPixelRef*> *resu lt) = 0; 40 virtual void query(const SkRect& queryRect, SkTDArray<SkPixelRef*> *resu lt) = 0;
41 41
42 private: 42 private:
43 typedef SkRefCnt INHERITED; 43 typedef SkRefCnt INHERITED;
44 }; 44 };
45 45
46 // Simple query structure that just stores a linked list of pixel refs 46 // Simple query structure that just stores a linked list of pixel refs
47 // and rects. 47 // and rects.
48 class SkPixelRefsAndRectsList : public SkPixelRefContainer { 48 class SkPixelRefsAndRectsList : public SkPixelRefContainer {
49 public: 49 public:
50 virtual void add(SkPixelRef* pr, const SkRect& rect) SK_OVERRIDE { 50 void add(SkPixelRef* pr, const SkRect& rect) SK_OVERRIDE {
51 PixelRefAndRect *dst = fArray.append(); 51 PixelRefAndRect *dst = fArray.append();
52 52
53 dst->fPixelRef = pr; 53 dst->fPixelRef = pr;
54 dst->fRect = rect; 54 dst->fRect = rect;
55 } 55 }
56 56
57 virtual void query(const SkRect& queryRect, SkTDArray<SkPixelRef*> *resu lt) SK_OVERRIDE { 57 void query(const SkRect& queryRect, SkTDArray<SkPixelRef*> *result) SK_O VERRIDE {
58 for (int i = 0; i < fArray.count(); ++i) { 58 for (int i = 0; i < fArray.count(); ++i) {
59 if (SkRect::Intersects(fArray[i].fRect, queryRect)) { 59 if (SkRect::Intersects(fArray[i].fRect, queryRect)) {
60 *result->append() = fArray[i].fPixelRef; 60 *result->append() = fArray[i].fPixelRef;
61 } 61 }
62 } 62 }
63 } 63 }
64 64
65 private: 65 private:
66 struct PixelRefAndRect { 66 struct PixelRefAndRect {
67 SkPixelRef* fPixelRef; 67 SkPixelRef* fPixelRef;
(...skipping 14 matching lines...) Expand all
82 /** 82 /**
83 * How many bytes are allocated to hold the SkPicture. 83 * How many bytes are allocated to hold the SkPicture.
84 * Includes operations, parameters, bounding data, deletion listeners; 84 * Includes operations, parameters, bounding data, deletion listeners;
85 * includes nested SkPictures, but does not include large objects that 85 * includes nested SkPictures, but does not include large objects that
86 * SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps). 86 * SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps).
87 */ 87 */
88 static size_t ApproximateBytesUsed(const SkPicture* pict); 88 static size_t ApproximateBytesUsed(const SkPicture* pict);
89 }; 89 };
90 90
91 #endif 91 #endif
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | include/utils/SkProxyCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698