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 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkColor.h" | 9 #include "SkColor.h" |
10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 rec = rec->fNext; | 250 rec = rec->fNext; |
251 n += 1; | 251 n += 1; |
252 } | 252 } |
253 SkASSERT(count == n); | 253 SkASSERT(count == n); |
254 } | 254 } |
255 #endif | 255 #endif |
256 | 256 |
257 return looper; | 257 return looper; |
258 } | 258 } |
259 | 259 |
260 #ifdef SK_DEVELOPER | 260 #ifndef SK_IGNORE_TO_STRING |
261 void SkLayerDrawLooper::toString(SkString* str) const { | 261 void SkLayerDrawLooper::toString(SkString* str) const { |
262 str->appendf("SkLayerDrawLooper (%d): ", fCount); | 262 str->appendf("SkLayerDrawLooper (%d): ", fCount); |
263 | 263 |
264 Rec* rec = fRecs; | 264 Rec* rec = fRecs; |
265 for (int i = 0; i < fCount; i++) { | 265 for (int i = 0; i < fCount; i++) { |
266 str->appendf("%d: paintBits: (", i); | 266 str->appendf("%d: paintBits: (", i); |
267 if (0 == rec->fInfo.fPaintBits) { | 267 if (0 == rec->fInfo.fPaintBits) { |
268 str->append("None"); | 268 str->append("None"); |
269 } else if (kEntirePaint_Bits == rec->fInfo.fPaintBits) { | 269 } else if (kEntirePaint_Bits == rec->fInfo.fPaintBits) { |
270 str->append("EntirePaint"); | 270 str->append("EntirePaint"); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 SkLayerDrawLooper* looper = SkNEW(SkLayerDrawLooper); | 372 SkLayerDrawLooper* looper = SkNEW(SkLayerDrawLooper); |
373 looper->fCount = fCount; | 373 looper->fCount = fCount; |
374 looper->fRecs = fRecs; | 374 looper->fRecs = fRecs; |
375 | 375 |
376 fCount = 0; | 376 fCount = 0; |
377 fRecs = NULL; | 377 fRecs = NULL; |
378 fTopRec = NULL; | 378 fTopRec = NULL; |
379 | 379 |
380 return looper; | 380 return looper; |
381 } | 381 } |
OLD | NEW |