diff options
author | halcanary <halcanary@google.com> | 2015-08-27 07:41:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-27 07:41:16 -0700 |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/gpu/batches | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'src/gpu/batches')
-rw-r--r-- | src/gpu/batches/GrAAFillRectBatch.cpp | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrCopySurfaceBatch.cpp | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrDrawVerticesBatch.cpp | 4 | ||||
-rw-r--r-- | src/gpu/batches/GrVertexBatch.cpp | 6 | ||||
-rw-r--r-- | src/gpu/batches/GrVertexBatch.h | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp index 7ca24ea8f4..69fd0ef65b 100644 --- a/src/gpu/batches/GrAAFillRectBatch.cpp +++ b/src/gpu/batches/GrAAFillRectBatch.cpp @@ -237,7 +237,7 @@ public: const GrPipelineOptimizations& opts) { generate_aa_fill_rect_geometry(vertices, vertexStride, geo.fColor, geo.fViewMatrix, geo.fRect, geo.fDevRect, opts, - NULL); + nullptr); } }; diff --git a/src/gpu/batches/GrCopySurfaceBatch.cpp b/src/gpu/batches/GrCopySurfaceBatch.cpp index b4e7ce2fbd..098f7c7704 100644 --- a/src/gpu/batches/GrCopySurfaceBatch.cpp +++ b/src/gpu/batches/GrCopySurfaceBatch.cpp @@ -73,7 +73,7 @@ GrBatch* GrCopySurfaceBatch::Create(GrSurface* dst, GrSurface* src, const SkIRec dstPoint, &clippedSrcRect, &clippedDstPoint)) { - return NULL; + return nullptr; } return new GrCopySurfaceBatch(dst, src, clippedSrcRect, clippedDstPoint); } diff --git a/src/gpu/batches/GrDrawVerticesBatch.cpp b/src/gpu/batches/GrDrawVerticesBatch.cpp index bca7d230bc..f79b6859df 100644 --- a/src/gpu/batches/GrDrawVerticesBatch.cpp +++ b/src/gpu/batches/GrDrawVerticesBatch.cpp @@ -134,10 +134,10 @@ void GrDrawVerticesBatch::onPrepareDraws(Target* target) { return; } - const GrIndexBuffer* indexBuffer = NULL; + const GrIndexBuffer* indexBuffer = nullptr; int firstIndex = 0; - uint16_t* indices = NULL; + uint16_t* indices = nullptr; if (this->hasIndices()) { indices = target->makeIndexSpace(this->indexCount(), &indexBuffer, &firstIndex); diff --git a/src/gpu/batches/GrVertexBatch.cpp b/src/gpu/batches/GrVertexBatch.cpp index d61b51145a..5d10a72595 100644 --- a/src/gpu/batches/GrVertexBatch.cpp +++ b/src/gpu/batches/GrVertexBatch.cpp @@ -22,7 +22,7 @@ void* GrVertexBatch::InstancedHelper::init(Target* target, GrPrimitiveType primT int instancesToDraw) { SkASSERT(target); if (!indexBuffer) { - return NULL; + return nullptr; } const GrVertexBuffer* vertexBuffer; int firstVertex; @@ -30,7 +30,7 @@ void* GrVertexBatch::InstancedHelper::init(Target* target, GrPrimitiveType primT void* vertices = target->makeVertexSpace(vertexStride, vertexCount, &vertexBuffer, &firstVertex); if (!vertices) { SkDebugf("Vertices could not be allocated for instanced rendering."); - return NULL; + return nullptr; } SkASSERT(vertexBuffer); size_t ibSize = indexBuffer->gpuMemorySize(); @@ -53,7 +53,7 @@ void* GrVertexBatch::QuadHelper::init(Target* target, size_t vertexStride, target->resourceProvider()->refQuadIndexBuffer()); if (!quadIndexBuffer) { SkDebugf("Could not get quad index buffer."); - return NULL; + return nullptr; } return this->INHERITED::init(target, kTriangles_GrPrimitiveType, vertexStride, quadIndexBuffer, kVerticesPerQuad, kIndicesPerQuad, quadsToDraw); diff --git a/src/gpu/batches/GrVertexBatch.h b/src/gpu/batches/GrVertexBatch.h index 0ff5ac18bc..5ec9683b89 100644 --- a/src/gpu/batches/GrVertexBatch.h +++ b/src/gpu/batches/GrVertexBatch.h @@ -51,7 +51,7 @@ protected: class QuadHelper : private InstancedHelper { public: QuadHelper() : INHERITED() {} - /** Finds the cached quad index buffer and reserves vertex space. Returns NULL on failure + /** Finds the cached quad index buffer and reserves vertex space. Returns nullptr on failure and on sucess a pointer to the vertex data that the caller should populate before calling issueDraws(). */ void* init(Target* batchTarget, size_t vertexStride, int quadsToDraw); |