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

Unified Diff: src/core/SkShader.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/core/SkSemaphore.cpp ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 41724d90487ebb585533e8d1f471a2909a11eff7..6da73fc45faf01f206c6c5dc737398ffa06792d9 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -224,13 +224,9 @@ SkShader* SkShader::refAsALocalMatrixShader(SkMatrix*) const {
return NULL;
}
-SkShader* SkShader::CreateEmptyShader() {
- return SkNEW(SkEmptyShader);
-}
+SkShader* SkShader::CreateEmptyShader() { return new SkEmptyShader; }
-SkShader* SkShader::CreateColorShader(SkColor color) {
- return SkNEW_ARGS(SkColorShader, (color));
-}
+SkShader* SkShader::CreateColorShader(SkColor color) { return new SkColorShader(color); }
SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix) {
@@ -264,7 +260,7 @@ bool SkColorShader::isOpaque() const {
}
SkFlattenable* SkColorShader::CreateProc(SkReadBuffer& buffer) {
- return SkNEW_ARGS(SkColorShader, (buffer.readColor()));
+ return new SkColorShader(buffer.readColor());
}
void SkColorShader::flatten(SkWriteBuffer& buffer) const {
@@ -280,7 +276,7 @@ uint8_t SkColorShader::ColorShaderContext::getSpan16Alpha() const {
}
SkShader::Context* SkColorShader::onCreateContext(const ContextRec& rec, void* storage) const {
- return SkNEW_PLACEMENT_ARGS(storage, ColorShaderContext, (*this, rec));
+ return new (storage) ColorShaderContext(*this, rec);
}
SkColorShader::ColorShaderContext::ColorShaderContext(const SkColorShader& shader,
« no previous file with comments | « src/core/SkSemaphore.cpp ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698