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

Side by Side Diff: src/core/SkLayerInfo.h

Issue 1300163002: unsigned -> int for counts and indices in picture-related code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 5 years, 4 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 | « src/core/SkBigPicture.cpp ('k') | src/core/SkRTree.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 2014 Google Inc. 2 * Copyright 2014 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 SkLayerInfo_DEFINED 8 #ifndef SkLayerInfo_DEFINED
9 #define SkLayerInfo_DEFINED 9 #define SkLayerInfo_DEFINED
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // The index of the matching restore in the picture. 49 // The index of the matching restore in the picture.
50 size_t fRestoreOpID; 50 size_t fRestoreOpID;
51 // True if this saveLayer has at least one other saveLayer nested within it. 51 // True if this saveLayer has at least one other saveLayer nested within it.
52 // False otherwise. 52 // False otherwise.
53 bool fHasNestedLayers; 53 bool fHasNestedLayers;
54 // True if this saveLayer is nested within another. False otherwise. 54 // True if this saveLayer is nested within another. False otherwise.
55 bool fIsNested; 55 bool fIsNested;
56 // The variable length key for this saveLayer block. It stores the 56 // The variable length key for this saveLayer block. It stores the
57 // thread of drawPicture and saveLayer operation indices that lead to th is 57 // thread of drawPicture and saveLayer operation indices that lead to th is
58 // saveLayer (including its own op index). The BlockInfo owns this memor y. 58 // saveLayer (including its own op index). The BlockInfo owns this memor y.
59 unsigned* fKey; 59 int* fKey;
60 int fKeySize; // # of ints 60 int fKeySize; // # of ints
61 }; 61 };
62 62
63 SkLayerInfo() {} 63 SkLayerInfo() {}
64 64
65 BlockInfo& addBlock() { return fBlocks.push_back(); } 65 BlockInfo& addBlock() { return fBlocks.push_back(); }
66 66
67 int numBlocks() const { return fBlocks.count(); } 67 int numBlocks() const { return fBlocks.count(); }
68 68
69 const BlockInfo& block(int index) const { 69 const BlockInfo& block(int index) const {
70 SkASSERT(index < fBlocks.count()); 70 SkASSERT(index < fBlocks.count());
71 71
72 return fBlocks[index]; 72 return fBlocks[index];
73 } 73 }
74 74
75 private: 75 private:
76 SkTArray<BlockInfo, true> fBlocks; 76 SkTArray<BlockInfo, true> fBlocks;
77 77
78 typedef SkBigPicture::AccelData INHERITED; 78 typedef SkBigPicture::AccelData INHERITED;
79 }; 79 };
80 80
81 #endif // SkLayerInfo_DEFINED 81 #endif // SkLayerInfo_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkBigPicture.cpp ('k') | src/core/SkRTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698