Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 6a1c1dd..2fdfbc4 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -71,30 +71,30 @@
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 @@
if (!this->caps()->npotTextureTileSupport() &&
(!SkIsPow2(desc.fWidth) || !SkIsPow2(desc.fHeight))) {
- return NULL;
+ return nullptr;
}
this->handleDirtyContext();
@@ -136,7 +136,7 @@
}
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 @@
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;
}