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

Unified Diff: src/images/SkMovie_gif.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkMovie.cpp ('k') | src/images/SkScaledBitmapSampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkMovie_gif.cpp
diff --git a/src/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp
index c40f552ceada35711e983b12c0ed94cecd07227d..103107961bb9891938cde8aa7d6eb1472ff47ba3 100644
--- a/src/images/SkMovie_gif.cpp
+++ b/src/images/SkMovie_gif.cpp
@@ -48,15 +48,15 @@ SkGIFMovie::SkGIFMovie(SkStream* stream)
#if GIFLIB_MAJOR < 5
fGIF = DGifOpen( stream, Decode );
#else
- fGIF = DGifOpen( stream, Decode, NULL );
+ fGIF = DGifOpen( stream, Decode, nullptr );
#endif
- if (NULL == fGIF)
+ if (nullptr == fGIF)
return;
if (DGifSlurp(fGIF) != GIF_OK)
{
- DGifCloseFile(fGIF, NULL);
- fGIF = NULL;
+ DGifCloseFile(fGIF, nullptr);
+ fGIF = nullptr;
}
fCurrIndex = -1;
fLastDrawIndex = -1;
@@ -66,7 +66,7 @@ SkGIFMovie::SkGIFMovie(SkStream* stream)
SkGIFMovie::~SkGIFMovie()
{
if (fGIF)
- DGifCloseFile(fGIF, NULL);
+ DGifCloseFile(fGIF, nullptr);
}
static SkMSec savedimage_duration(const SavedImage* image)
@@ -85,7 +85,7 @@ static SkMSec savedimage_duration(const SavedImage* image)
bool SkGIFMovie::onGetInfo(Info* info)
{
- if (NULL == fGIF)
+ if (nullptr == fGIF)
return false;
SkMSec dur = 0;
@@ -101,7 +101,7 @@ bool SkGIFMovie::onGetInfo(Info* info)
bool SkGIFMovie::onSetTime(SkMSec time)
{
- if (NULL == fGIF)
+ if (nullptr == fGIF)
return false;
SkMSec dur = 0;
@@ -239,12 +239,12 @@ static void drawFrame(SkBitmap* bm, const SavedImage* frame, const ColorMapObjec
}
}
- if (frame->ImageDesc.ColorMap != NULL) {
+ if (frame->ImageDesc.ColorMap != nullptr) {
// use local color table
cmap = frame->ImageDesc.ColorMap;
}
- if (cmap == NULL || cmap->ColorCount != (1 << cmap->BitsPerPixel)) {
+ if (cmap == nullptr || cmap->ColorCount != (1 << cmap->BitsPerPixel)) {
SkDEBUGFAIL("bad colortable setup");
return;
}
@@ -345,7 +345,7 @@ static void disposeFrameIfNeeded(SkBitmap* bm, const SavedImage* cur, const Save
bool SkGIFMovie::onGetBitmap(SkBitmap* bm)
{
const GifFileType* gif = fGIF;
- if (NULL == gif)
+ if (nullptr == gif)
return false;
if (gif->ImageCount < 1) {
@@ -392,7 +392,7 @@ bool SkGIFMovie::onGetBitmap(SkBitmap* bm)
}
SkColor bgColor = SkPackARGB32(0, 0, 0, 0);
- if (gif->SColorMap != NULL) {
+ if (gif->SColorMap != nullptr) {
const GifColorType& col = gif->SColorMap->Colors[fGIF->SBackGroundColor];
bgColor = SkColorSetARGB(0xFF, col.Red, col.Green, col.Blue);
}
@@ -404,7 +404,7 @@ bool SkGIFMovie::onGetBitmap(SkBitmap* bm)
bool trans;
int disposal;
getTransparencyAndDisposalMethod(cur, &trans, &disposal);
- if (!trans && gif->SColorMap != NULL) {
+ if (!trans && gif->SColorMap != nullptr) {
fPaintingColor = bgColor;
} else {
fPaintingColor = SkColorSetARGB(0, 0, 0, 0);
@@ -446,7 +446,7 @@ SkMovie* Factory(SkStreamRewindable* stream) {
return new SkGIFMovie(stream);
}
}
- return NULL;
+ return nullptr;
}
static SkTRegistry<SkMovie*(*)(SkStreamRewindable*)> gReg(Factory);
« no previous file with comments | « src/images/SkMovie.cpp ('k') | src/images/SkScaledBitmapSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698