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

Unified Diff: src/image/SkImage_Gpu.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/image/SkImage_Base.h ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index d758795d43b5c15dc5eb477cf3efc80a04484bd3..6655e39c17d400963708767639e3981df22b1fc0 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -16,7 +16,7 @@
SkImage_Gpu::SkImage_Gpu(int w, int h, uint32_t uniqueID, SkAlphaType at, GrTexture* tex,
int sampleCountForNewSurfaces, SkSurface::Budgeted budgeted)
- : INHERITED(w, h, uniqueID, NULL)
+ : INHERITED(w, h, uniqueID, nullptr)
, fTexture(SkRef(tex))
, fSampleCountForNewSurfaces(sampleCountForNewSurfaces)
, fAlphaType(at)
@@ -36,7 +36,7 @@ SkSurface* SkImage_Gpu::onNewSurface(const SkImageInfo& info, const SkSurfacePro
GrContext* ctx = tex->getContext();
if (!ctx) {
// the texture may have been abandoned, so we have to check
- return NULL;
+ return nullptr;
}
// TODO: Change signature of onNewSurface to take a budgeted param.
const SkSurface::Budgeted budgeted = SkSurface::kNo_Budgeted;
@@ -138,11 +138,11 @@ static SkImage* new_wrapped_texture_common(GrContext* ctx, const GrBackendTextur
SkImage::TextureReleaseProc releaseProc,
SkImage::ReleaseContext releaseCtx) {
if (desc.fWidth <= 0 || desc.fHeight <= 0) {
- return NULL;
+ return nullptr;
}
SkAutoTUnref<GrTexture> tex(ctx->textureProvider()->wrapBackendTexture(desc, ownership));
if (!tex) {
- return NULL;
+ return nullptr;
}
if (releaseProc) {
tex->setRelease(releaseProc, releaseCtx);
@@ -159,25 +159,25 @@ SkImage* SkImage::NewFromTexture(GrContext* ctx, const GrBackendTextureDesc& des
SkImage* SkImage::NewFromAdoptedTexture(GrContext* ctx, const GrBackendTextureDesc& desc,
SkAlphaType at) {
- return new_wrapped_texture_common(ctx, desc, at, kAdopt_GrWrapOwnership, NULL, NULL);
+ return new_wrapped_texture_common(ctx, desc, at, kAdopt_GrWrapOwnership, nullptr, nullptr);
}
SkImage* SkImage::NewFromTextureCopy(GrContext* ctx, const GrBackendTextureDesc& desc,
SkAlphaType at) {
if (desc.fWidth <= 0 || desc.fHeight <= 0) {
- return NULL;
+ return nullptr;
}
SkAutoTUnref<GrTexture> src(ctx->textureProvider()->wrapBackendTexture(
desc, kBorrow_GrWrapOwnership));
if (!src) {
- return NULL;
+ return nullptr;
}
const bool isBudgeted = true;
SkAutoTUnref<GrTexture> dst(GrDeepCopyTexture(src, isBudgeted));
if (!dst) {
- return NULL;
+ return nullptr;
}
const SkSurface::Budgeted budgeted = SkSurface::kYes_Budgeted;
@@ -195,7 +195,7 @@ SkImage* SkImage::NewFromYUVTexturesCopy(GrContext* ctx , SkYUVColorSpace colorS
if (yuvSizes[0].fWidth <= 0 || yuvSizes[0].fHeight <= 0 ||
yuvSizes[1].fWidth <= 0 || yuvSizes[1].fHeight <= 0 ||
yuvSizes[2].fWidth <= 0 || yuvSizes[2].fHeight <= 0) {
- return NULL;
+ return nullptr;
}
static const GrPixelConfig kConfig = kAlpha_8_GrPixelConfig;
GrBackendTextureDesc yDesc;
@@ -229,7 +229,7 @@ SkImage* SkImage::NewFromYUVTexturesCopy(GrContext* ctx , SkYUVColorSpace colorS
SkAutoTUnref<GrTexture> vTex(ctx->textureProvider()->wrapBackendTexture(
vDesc, kBorrow_GrWrapOwnership));
if (!yTex || !uTex || !vTex) {
- return NULL;
+ return nullptr;
}
GrSurfaceDesc dstDesc;
@@ -243,7 +243,7 @@ SkImage* SkImage::NewFromYUVTexturesCopy(GrContext* ctx , SkYUVColorSpace colorS
SkAutoTUnref<GrTexture> dst(ctx->textureProvider()->createTexture(dstDesc, true));
if (!dst) {
- return NULL;
+ return nullptr;
}
GrPaint paint;
@@ -267,9 +267,9 @@ GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) {
GrContext* ctx = src->getContext();
GrSurfaceDesc desc = src->desc();
- GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, NULL, 0);
+ GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullptr, 0);
if (!dst) {
- return NULL;
+ return nullptr;
}
const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
« no previous file with comments | « src/image/SkImage_Base.h ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698