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

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

Issue 769533004: Fuse GrReplacements and GrLayerCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clang Created 6 years 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 | « no previous file | src/core/SkMultiPictureDraw.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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // The index of the matching restore in the picture. 46 // The index of the matching restore in the picture.
47 size_t fRestoreOpID; 47 size_t fRestoreOpID;
48 // True if this saveLayer has at least one other saveLayer nested within it. 48 // True if this saveLayer has at least one other saveLayer nested within it.
49 // False otherwise. 49 // False otherwise.
50 bool fHasNestedLayers; 50 bool fHasNestedLayers;
51 // True if this saveLayer is nested within another. False otherwise. 51 // True if this saveLayer is nested within another. False otherwise.
52 bool fIsNested; 52 bool fIsNested;
53 // The variable length key for this saveLayer block. It stores the 53 // The variable length key for this saveLayer block. It stores the
54 // thread of drawPicture and saveLayer operation indices that lead to th is 54 // thread of drawPicture and saveLayer operation indices that lead to th is
55 // saveLayer (including its own op index). The BlockInfo owns this memor y. 55 // saveLayer (including its own op index). The BlockInfo owns this memor y.
56 int* fKey; 56 unsigned* fKey;
57 int fKeySize; // # of ints 57 int fKeySize; // # of ints
58 }; 58 };
59 59
60 SkLayerInfo(Key key) : INHERITED(key) { } 60 SkLayerInfo(Key key) : INHERITED(key) { }
61 61
62 BlockInfo& addBlock() { return fBlocks.push_back(); } 62 BlockInfo& addBlock() { return fBlocks.push_back(); }
63 63
64 int numBlocks() const { return fBlocks.count(); } 64 int numBlocks() const { return fBlocks.count(); }
65 65
66 const BlockInfo& block(int index) const { 66 const BlockInfo& block(int index) const {
67 SkASSERT(index < fBlocks.count()); 67 SkASSERT(index < fBlocks.count());
68 68
69 return fBlocks[index]; 69 return fBlocks[index];
70 } 70 }
71 71
72 // We may, in the future, need to pass in the GPUDevice in order to 72 // We may, in the future, need to pass in the GPUDevice in order to
73 // incorporate the clip and matrix state into the key 73 // incorporate the clip and matrix state into the key
74 static SkPicture::AccelData::Key ComputeKey(); 74 static SkPicture::AccelData::Key ComputeKey();
75 75
76 private: 76 private:
77 SkTArray<BlockInfo, true> fBlocks; 77 SkTArray<BlockInfo, true> fBlocks;
78 78
79 typedef SkPicture::AccelData INHERITED; 79 typedef SkPicture::AccelData INHERITED;
80 }; 80 };
81 81
82 #endif // SkLayerInfo_DEFINED 82 #endif // SkLayerInfo_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkMultiPictureDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698