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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 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/pdf/SkPDFResourceDict.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.cpp
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index e518bcf89c5a3e415ed9d1a4e2fcd7a790ee189f..6b4e7589503612e2b6772ef0db132be7f7f9e1a1 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -518,8 +518,7 @@ SkPDFObject* SkPDFShader::GetPDFShader(SkPDFCanon* canon,
const SkMatrix& matrix,
const SkIRect& surfaceBBox,
SkScalar rasterScale) {
- SkAutoTDelete<SkPDFShader::State> state(
- SkNEW_ARGS(State, (shader, matrix, surfaceBBox, rasterScale)));
+ SkAutoTDelete<SkPDFShader::State> state(new State(shader, matrix, surfaceBBox, rasterScale));
return get_pdf_shader_by_state(canon, dpi, &state);
}
@@ -625,7 +624,7 @@ SkPDFAlphaFunctionShader* SkPDFAlphaFunctionShader::Create(
create_smask_graphic_state(canon, dpi, state));
SkPDFAlphaFunctionShader* alphaFunctionShader =
- SkNEW_ARGS(SkPDFAlphaFunctionShader, (autoState->detach()));
+ new SkPDFAlphaFunctionShader(autoState->detach());
SkAutoTUnref<SkPDFDict> resourceDict(
get_gradient_resource_dict(colorShader.get(), alphaGs.get()));
@@ -680,7 +679,7 @@ static bool split_perspective(const SkMatrix in, SkMatrix* affine,
namespace {
SkPDFObject* create_range_object() {
- SkPDFArray* range = SkNEW(SkPDFArray);
+ SkPDFArray* range = new SkPDFArray;
range->reserve(6);
range->appendInt(0);
range->appendInt(1);
@@ -701,7 +700,7 @@ static SkPDFStream* make_ps_function(const SkString& psCode,
SkPDFArray* domain) {
SkAutoDataUnref funcData(
SkData::NewWithCopy(psCode.c_str(), psCode.size()));
- SkPDFStream* result = SkNEW_ARGS(SkPDFStream, (funcData.get()));
+ SkPDFStream* result = new SkPDFStream(funcData.get());
result->insertInt("FunctionType", 4);
result->insertObject("Domain", SkRef(domain));
result->insertObject("Range", SkRef(rangeObject.get()));
@@ -814,8 +813,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create(
make_ps_function(functionCode, domain.get()));
pdfShader->insertObjRef("Function", function.detach());
- SkPDFFunctionShader* pdfFunctionShader =
- SkNEW_ARGS(SkPDFFunctionShader, (autoState->detach()));
+ SkPDFFunctionShader* pdfFunctionShader = new SkPDFFunctionShader(autoState->detach());
pdfFunctionShader->insertInt("PatternType", 2);
pdfFunctionShader->insertObject("Matrix",
@@ -1028,8 +1026,7 @@ SkPDFImageShader* SkPDFImageShader::Create(
// Put the canvas into the pattern stream (fContent).
SkAutoTDelete<SkStreamAsset> content(patternDevice->content());
- SkPDFImageShader* imageShader =
- SkNEW_ARGS(SkPDFImageShader, (autoState->detach()));
+ SkPDFImageShader* imageShader = new SkPDFImageShader(autoState->detach());
imageShader->setData(content.get());
SkAutoTUnref<SkPDFDict> resourceDict(
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698