OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 kClip_HasAntiAlias_DrawOpFlag = 1 << 0, | 165 kClip_HasAntiAlias_DrawOpFlag = 1 << 0, |
166 }; | 166 }; |
167 /////////////////////////////////////////////////////////////////////////////// | 167 /////////////////////////////////////////////////////////////////////////////// |
168 | 168 |
169 class BitmapInfo : SkNoncopyable { | 169 class BitmapInfo : SkNoncopyable { |
170 public: | 170 public: |
171 BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) | 171 BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) |
172 : fBitmap(bitmap) | 172 : fBitmap(bitmap) |
173 , fGenID(genID) | 173 , fGenID(genID) |
174 , fBytesAllocated(0) | 174 , fBytesAllocated(0) |
175 , fMoreRecentlyUsed(NULL) | 175 , fMoreRecentlyUsed(nullptr) |
176 , fLessRecentlyUsed(NULL) | 176 , fLessRecentlyUsed(nullptr) |
177 , fToBeDrawnCount(toBeDrawnCount) | 177 , fToBeDrawnCount(toBeDrawnCount) |
178 {} | 178 {} |
179 | 179 |
180 ~BitmapInfo() { | 180 ~BitmapInfo() { |
181 SkASSERT(0 == fToBeDrawnCount); | 181 SkASSERT(0 == fToBeDrawnCount); |
182 delete fBitmap; | 182 delete fBitmap; |
183 } | 183 } |
184 | 184 |
185 void addDraws(int drawsToAdd) { | 185 void addDraws(int drawsToAdd) { |
186 if (0 == fToBeDrawnCount) { | 186 if (0 == fToBeDrawnCount) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); | 305 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
306 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); | 306 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); |
307 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); | 307 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); |
308 | 308 |
309 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | | 309 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | |
310 (flags << PAINTOPS_DATA_BITS) | | 310 (flags << PAINTOPS_DATA_BITS) | |
311 data; | 311 data; |
312 } | 312 } |
313 | 313 |
314 #endif | 314 #endif |
OLD | NEW |