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/pdf/SkPDFShader.cpp | |
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/pdf/SkPDFShader.cpp')
-rw-r--r-- | src/pdf/SkPDFShader.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index 6b4e758950..645091dad2 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -495,7 +495,7 @@ static SkPDFObject* get_pdf_shader_by_state( // handle compose shader by pulling things up to a layer, drawing with // the first shader, applying the xfer mode and drawing again with the // second shader, then applying the layer to the original drawing. - return NULL; + return nullptr; } else if (state.fType == SkShader::kNone_GradientType) { SkPDFObject* shader = canon->findImageShader(state); return shader ? SkRef(shader) @@ -533,7 +533,7 @@ static SkPDFDict* get_gradient_resource_dict( if (gState) { graphicStates.push(gState); } - return SkPDFResourceDict::Create(&graphicStates, &patterns, NULL, NULL); + return SkPDFResourceDict::Create(&graphicStates, &patterns, nullptr, nullptr); } static void populate_tiling_pattern_dict(SkPDFDict* pattern, @@ -592,7 +592,7 @@ static SkPDFObject* create_smask_graphic_state( SkAutoTDelete<SkStream> alphaStream(create_pattern_fill_content(-1, bbox)); SkAutoTUnref<SkPDFDict> - resources(get_gradient_resource_dict(luminosityShader, NULL)); + resources(get_gradient_resource_dict(luminosityShader, nullptr)); SkAutoTUnref<SkPDFFormXObject> alphaMask( new SkPDFFormXObject(alphaStream.get(), bbox, resources.get())); @@ -615,7 +615,7 @@ SkPDFAlphaFunctionShader* SkPDFAlphaFunctionShader::Create( SkAutoTUnref<SkPDFObject> colorShader( get_pdf_shader_by_state(canon, dpi, &opaqueState)); if (!colorShader) { - return NULL; + return nullptr; } // Create resource dict with alpha graphics state as G0 and @@ -712,7 +712,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( const SkPDFShader::State& state = **autoState; SkString (*codeFunction)(const SkShader::GradientInfo& info, - const SkMatrix& perspectiveRemover) = NULL; + const SkMatrix& perspectiveRemover) = nullptr; SkPoint transformPoints[2]; // Depending on the type of the gradient, we want to transform the @@ -743,7 +743,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( case SkShader::kColor_GradientType: case SkShader::kNone_GradientType: default: - return NULL; + return nullptr; } // Move any scaling (assuming a unit gradient) or translation @@ -766,14 +766,14 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( if (finalMatrix.hasPerspective()) { if (!split_perspective(finalMatrix, &finalMatrix, &perspectiveInverseOnly)) { - return NULL; + return nullptr; } } SkRect bbox; bbox.set(state.fBBox); if (!inverse_transform_bbox(finalMatrix, &bbox)) { - return NULL; + return nullptr; } SkAutoTUnref<SkPDFArray> domain(new SkPDFArray); @@ -792,7 +792,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( SkShader::GradientInfo twoPointRadialInfo = *info; SkMatrix inverseMapperMatrix; if (!mapperMatrix.invert(&inverseMapperMatrix)) { - return NULL; + return nullptr; } inverseMapperMatrix.mapPoints(twoPointRadialInfo.fPoint, 2); twoPointRadialInfo.fRadius[0] = @@ -843,7 +843,7 @@ SkPDFImageShader* SkPDFImageShader::Create( SkRect deviceBounds; deviceBounds.set(state.fBBox); if (!inverse_transform_bbox(finalMatrix, &deviceBounds)) { - return NULL; + return nullptr; } const SkBitmap* image = &state.fImage; @@ -1099,8 +1099,8 @@ SkPDFShader::State::State(const SkShader& shader, const SkMatrix& canvasTransfor fBBox(bbox), fPixelGeneration(0) { fInfo.fColorCount = 0; - fInfo.fColors = NULL; - fInfo.fColorOffsets = NULL; + fInfo.fColors = nullptr; + fInfo.fColorOffsets = nullptr; fShaderTransform = shader.getLocalMatrix(); fImageTileModes[0] = fImageTileModes[1] = SkShader::kClamp_TileMode; |