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

Unified Diff: gm/dcshader.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 | « gm/dashing.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dcshader.cpp
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 0c4049b46f02405dd3bb38f6cc3f6bbefb6d8614..e0cb2d714f983903bdd61b4197c3f8b31ae0121e 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -50,7 +50,7 @@ private:
SkFlattenable* DCShader::CreateProc(SkReadBuffer& buf) {
SkMatrix matrix;
buf.readMatrix(&matrix);
- return SkNEW_ARGS(DCShader, (matrix));
+ return new DCShader(matrix);
}
class DCFP : public GrFragmentProcessor {
@@ -76,7 +76,7 @@ public:
}
void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override {}
};
- return SkNEW(DCGLFP);
+ return new DCGLFP;
}
const char* name() const override { return "DCFP"; }
@@ -98,7 +98,7 @@ bool DCShader::asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMat
const SkMatrix* localMatrix, GrColor* color,
GrProcessorDataManager* procDataManager,
GrFragmentProcessor** fp) const {
- *fp = SkNEW_ARGS(DCFP, (procDataManager, fDeviceMatrix));
+ *fp = new DCFP(procDataManager, fDeviceMatrix);
*color = GrColorPackA4(paint.getAlpha());
return true;
}
@@ -111,7 +111,7 @@ public:
~DCShaderGM() override {
for (int i = 0; i < fPrims.count(); ++i) {
- SkDELETE(fPrims[i]);
+ delete fPrims[i];
}
}
@@ -212,15 +212,15 @@ protected:
virtual const char* text() const { return "Hello, Skia!"; }
};
- fPrims.push_back(SkNEW(Rect));
- fPrims.push_back(SkNEW(Circle));
- fPrims.push_back(SkNEW(RRect));
- fPrims.push_back(SkNEW(DRRect));
- fPrims.push_back(SkNEW(Path));
- fPrims.push_back(SkNEW(Points(SkCanvas::kPoints_PointMode)));
- fPrims.push_back(SkNEW(Points(SkCanvas::kLines_PointMode)));
- fPrims.push_back(SkNEW(Points(SkCanvas::kPolygon_PointMode)));
- fPrims.push_back(SkNEW(Text));
+ fPrims.push_back(new Rect);
+ fPrims.push_back(new Circle);
+ fPrims.push_back(new RRect);
+ fPrims.push_back(new DRRect);
+ fPrims.push_back(new Path);
+ fPrims.push_back(new Points(SkCanvas::kPoints_PointMode));
+ fPrims.push_back(new Points(SkCanvas::kLines_PointMode));
+ fPrims.push_back(new Points(SkCanvas::kPolygon_PointMode));
+ fPrims.push_back(new Text);
}
void onDraw(SkCanvas* canvas) override {
@@ -253,7 +253,7 @@ protected:
for (int i = 0; i < fPrims.count(); ++i) {
for (int j = 0; j < devMats.count(); ++j) {
for (int k = 0; k < viewMats.count(); ++k) {
- paint.setShader(SkNEW_ARGS(DCShader, (devMats[j])))->unref();
+ paint.setShader(new DCShader(devMats[j]))->unref();
paint.setAntiAlias(SkToBool(aa));
canvas->save();
canvas->concat(viewMats[k]);
@@ -291,6 +291,6 @@ private:
typedef GM INHERITED;
};
-DEF_GM( return SkNEW(DCShaderGM); )
+DEF_GM(return new DCShaderGM;)
}
#endif
« no previous file with comments | « gm/dashing.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698