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

Unified Diff: src/core/SkBlitter.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/SkBitmapScaler.cpp ('k') | src/core/SkCachedData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter.cpp
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index a932ba90b98a116ee226ea20b115eb044f3bcb07..62cd73ee24bd8f55fe4db34acc43a246afa2085e 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -597,7 +597,7 @@ public:
return NULL;
}
}
- return SkNEW_PLACEMENT_ARGS(storage, Sk3DShaderContext, (*this, rec, proxyContext));
+ return new (storage) Sk3DShaderContext(*this, rec, proxyContext);
}
class Sk3DShaderContext : public SkShader::Context {
@@ -726,7 +726,7 @@ private:
SkFlattenable* Sk3DShader::CreateProc(SkReadBuffer& buffer) {
SkAutoTUnref<SkShader> shader(buffer.readShader());
- return SkNEW_ARGS(Sk3DShader, (shader));
+ return new Sk3DShader(shader);
}
class Sk3DBlitter : public SkBlitter {
@@ -800,7 +800,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
if (origPaint.getMaskFilter() != NULL &&
origPaint.getMaskFilter()->getFormat() == SkMask::k3D_Format) {
- shader3D = SkNEW_ARGS(Sk3DShader, (shader));
+ shader3D = new Sk3DShader(shader);
// we know we haven't initialized lazyPaint yet, so just do it
paint.writable()->setShader(shader3D)->unref();
shader = shader3D;
@@ -837,7 +837,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
if (NULL == shader) {
if (mode) {
// xfermodes (and filters) require shaders for our current blitters
- shader = SkNEW_ARGS(SkColorShader, (paint->getColor()));
+ shader = new SkColorShader(paint->getColor());
paint.writable()->setShader(shader)->unref();
paint.writable()->setAlpha(0xFF);
} else if (cf) {
@@ -852,7 +852,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
if (cf) {
SkASSERT(shader);
- shader = SkNEW_ARGS(SkFilterShader, (shader, cf));
+ shader = new SkFilterShader(shader, cf);
paint.writable()->setShader(shader)->unref();
// blitters should ignore the presence/absence of a filter, since
// if there is one, the shader will take care of it.
@@ -970,7 +970,7 @@ bool SkShaderBlitter::resetShaderContext(const SkShader::ContextRec& rec) {
if (NULL == ctx) {
// Need a valid context in fShaderContext's storage, so we can later (or our caller) call
// the in-place destructor.
- SkNEW_PLACEMENT_ARGS(fShaderContext, SkZeroShaderContext, (*fShader, rec));
+ new (fShaderContext) SkZeroShaderContext(*fShader, rec);
return false;
}
return true;
« no previous file with comments | « src/core/SkBitmapScaler.cpp ('k') | src/core/SkCachedData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698