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

Unified Diff: src/gpu/GrGpu.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/gpu/GrGpu.h ('k') | src/gpu/GrGpuFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 6a1c1dd5c95994460e4e478ada6c61024a44d8e2..2fdfbc424200131b4f8ba1ad26a84b7dbe5966ba 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -71,30 +71,30 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, bool budgeted,
GrSurfaceDesc desc = origDesc;
if (!this->caps()->isConfigTexturable(desc.fConfig)) {
- return NULL;
+ return nullptr;
}
bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
- return NULL;
+ return nullptr;
}
// We currently do not support multisampled textures
if (!isRT && desc.fSampleCnt > 0) {
- return NULL;
+ return nullptr;
}
- GrTexture *tex = NULL;
+ GrTexture *tex = nullptr;
if (isRT) {
int maxRTSize = this->caps()->maxRenderTargetSize();
if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) {
- return NULL;
+ return nullptr;
}
} else {
int maxSize = this->caps()->maxTextureSize();
if (desc.fWidth > maxSize || desc.fHeight > maxSize) {
- return NULL;
+ return nullptr;
}
}
@@ -114,7 +114,7 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, bool budgeted,
if (!this->caps()->npotTextureTileSupport() &&
(!SkIsPow2(desc.fWidth) || !SkIsPow2(desc.fHeight))) {
- return NULL;
+ return nullptr;
}
this->handleDirtyContext();
@@ -136,7 +136,7 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, bool budgeted,
}
bool GrGpu::attachStencilAttachmentToRenderTarget(GrRenderTarget* rt) {
- SkASSERT(NULL == rt->renderTargetPriv().getStencilAttachment());
+ SkASSERT(nullptr == rt->renderTargetPriv().getStencilAttachment());
GrUniqueKey sbKey;
int width = rt->width();
@@ -180,14 +180,14 @@ bool GrGpu::attachStencilAttachmentToRenderTarget(GrRenderTarget* rt) {
GrTexture* GrGpu::wrapBackendTexture(const GrBackendTextureDesc& desc, GrWrapOwnership ownership) {
this->handleDirtyContext();
GrTexture* tex = this->onWrapBackendTexture(desc, ownership);
- if (NULL == tex) {
- return NULL;
+ if (nullptr == tex) {
+ return nullptr;
}
// TODO: defer this and attach dynamically
GrRenderTarget* tgt = tex->asRenderTarget();
if (tgt && !this->attachStencilAttachmentToRenderTarget(tgt)) {
tex->unref();
- return NULL;
+ return nullptr;
} else {
return tex;
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrGpuFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698