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

Unified Diff: src/image/SkSurface_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/SkSurface_Base.h ('k') | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Gpu.cpp
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 34671f72fc746ee236ed1c95682e7178bc76c14c..c0c6b6eed0985d844a51ed56452db9992556bbaa 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -81,7 +81,7 @@ SkSurface* SkSurface_Gpu::onNewSurface(const SkImageInfo& info) {
SkImage* SkSurface_Gpu::onNewImageSnapshot(Budgeted budgeted) {
const SkImageInfo info = fDevice->imageInfo();
const int sampleCount = fDevice->accessRenderTarget()->numColorSamples();
- SkImage* image = NULL;
+ SkImage* image = nullptr;
GrTexture* tex = fDevice->accessRenderTarget()->asTexture();
if (tex) {
image = new SkImage_Gpu(info.width(), info.height(), kNeedNewImageUniqueID,
@@ -120,7 +120,7 @@ SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurf
SkAutoTUnref<SkGpuDevice> device(
SkGpuDevice::Create(target, props, SkGpuDevice::kUninit_InitContents));
if (!device) {
- return NULL;
+ return nullptr;
}
return new SkSurface_Gpu(device);
}
@@ -130,28 +130,28 @@ SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, Budgeted budgeted, const S
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(ctx, budgeted, info, sampleCount, props,
SkGpuDevice::kClear_InitContents));
if (!device) {
- return NULL;
+ return nullptr;
}
return new SkSurface_Gpu(device);
}
SkSurface* SkSurface::NewFromBackendTexture(GrContext* context, const GrBackendTextureDesc& desc,
const SkSurfaceProps* props) {
- if (NULL == context) {
- return NULL;
+ if (nullptr == context) {
+ return nullptr;
}
if (!SkToBool(desc.fFlags & kRenderTarget_GrBackendTextureFlag)) {
- return NULL;
+ return nullptr;
}
SkAutoTUnref<GrSurface> surface(context->textureProvider()->wrapBackendTexture(desc,
kBorrow_GrWrapOwnership));
if (!surface) {
- return NULL;
+ return nullptr;
}
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(surface->asRenderTarget(), props,
SkGpuDevice::kUninit_InitContents));
if (!device) {
- return NULL;
+ return nullptr;
}
return new SkSurface_Gpu(device);
}
@@ -159,17 +159,17 @@ SkSurface* SkSurface::NewFromBackendTexture(GrContext* context, const GrBackendT
SkSurface* SkSurface::NewFromBackendRenderTarget(GrContext* context,
const GrBackendRenderTargetDesc& desc,
const SkSurfaceProps* props) {
- if (NULL == context) {
- return NULL;
+ if (nullptr == context) {
+ return nullptr;
}
SkAutoTUnref<GrRenderTarget> rt(context->textureProvider()->wrapBackendRenderTarget(desc));
if (!rt) {
- return NULL;
+ return nullptr;
}
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(rt, props,
SkGpuDevice::kUninit_InitContents));
if (!device) {
- return NULL;
+ return nullptr;
}
return new SkSurface_Gpu(device);
}
« no previous file with comments | « src/image/SkSurface_Base.h ('k') | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698