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

Side by Side Diff: src/codec/SkGifInterlaceIter.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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/codec/SkCodec_wbmp.cpp ('k') | src/codec/SkJpegCodec.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 2015 The Android Open Source Project 2 * Copyright 2015 The Android Open Source Project
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 #include "SkGifInterlaceIter.h" 8 #include "SkGifInterlaceIter.h"
9 9
10 static const uint8_t kStartingInterlaceYValues[] = { 0, 4, 2, 1 }; 10 static const uint8_t kStartingInterlaceYValues[] = { 0, 4, 2, 1 };
(...skipping 10 matching lines...) Expand all
21 void SkGifInterlaceIter::prepareY() { 21 void SkGifInterlaceIter::prepareY() {
22 int32_t y = fCurrY + fDeltaY; 22 int32_t y = fCurrY + fDeltaY;
23 23
24 // Iterate through fStartYPtr until a valid row is found. 24 // Iterate through fStartYPtr until a valid row is found.
25 // This ensures that we do not move past the height of the small images. 25 // This ensures that we do not move past the height of the small images.
26 while (y >= fHeight) { 26 while (y >= fHeight) {
27 if (kStartingInterlaceYValues + 27 if (kStartingInterlaceYValues +
28 SK_ARRAY_COUNT(kStartingInterlaceYValues) == fStartYPtr) { 28 SK_ARRAY_COUNT(kStartingInterlaceYValues) == fStartYPtr) {
29 // Now we have iterated over the entire image. Forbid any 29 // Now we have iterated over the entire image. Forbid any
30 // subsequent calls to nextY(). 30 // subsequent calls to nextY().
31 SkDEBUGCODE(fStartYPtr = NULL;) 31 SkDEBUGCODE(fStartYPtr = nullptr;)
32 SkDEBUGCODE(fDeltaYPtr = NULL;) 32 SkDEBUGCODE(fDeltaYPtr = nullptr;)
33 y = 0; 33 y = 0;
34 } else { 34 } else {
35 y = *fStartYPtr++; 35 y = *fStartYPtr++;
36 fDeltaY = *fDeltaYPtr++; 36 fDeltaY = *fDeltaYPtr++;
37 } 37 }
38 } 38 }
39 fCurrY = y; 39 fCurrY = y;
40 } 40 }
41 41
42 int32_t SkGifInterlaceIter::nextY() { 42 int32_t SkGifInterlaceIter::nextY() {
43 SkASSERT(fStartYPtr); 43 SkASSERT(fStartYPtr);
44 SkASSERT(fDeltaYPtr); 44 SkASSERT(fDeltaYPtr);
45 int32_t y = fCurrY; 45 int32_t y = fCurrY;
46 prepareY(); 46 prepareY();
47 return y; 47 return y;
48 } 48 }
OLDNEW
« no previous file with comments | « src/codec/SkCodec_wbmp.cpp ('k') | src/codec/SkJpegCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698