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

Side by Side Diff: src/effects/SkLayerDrawLooper.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkMagnifierImageFilter.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 /* 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 SkPaint* SkLayerDrawLooper::Builder::addLayerOnTop(const LayerInfo& info) { 331 SkPaint* SkLayerDrawLooper::Builder::addLayerOnTop(const LayerInfo& info) {
332 fCount += 1; 332 fCount += 1;
333 333
334 Rec* rec = SkNEW(Rec); 334 Rec* rec = SkNEW(Rec);
335 rec->fNext = NULL; 335 rec->fNext = NULL;
336 rec->fInfo = info; 336 rec->fInfo = info;
337 if (NULL == fRecs) { 337 if (NULL == fRecs) {
338 fRecs = rec; 338 fRecs = rec;
339 } else { 339 } else {
340 SkASSERT(NULL != fTopRec); 340 SkASSERT(fTopRec);
341 fTopRec->fNext = rec; 341 fTopRec->fNext = rec;
342 } 342 }
343 fTopRec = rec; 343 fTopRec = rec;
344 344
345 return &rec->fPaint; 345 return &rec->fPaint;
346 } 346 }
347 347
348 SkLayerDrawLooper* SkLayerDrawLooper::Builder::detachLooper() { 348 SkLayerDrawLooper* SkLayerDrawLooper::Builder::detachLooper() {
349 SkLayerDrawLooper* looper = SkNEW(SkLayerDrawLooper); 349 SkLayerDrawLooper* looper = SkNEW(SkLayerDrawLooper);
350 looper->fCount = fCount; 350 looper->fCount = fCount;
351 looper->fRecs = fRecs; 351 looper->fRecs = fRecs;
352 352
353 fCount = 0; 353 fCount = 0;
354 fRecs = NULL; 354 fRecs = NULL;
355 fTopRec = NULL; 355 fTopRec = NULL;
356 356
357 return looper; 357 return looper;
358 } 358 }
OLDNEW
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698