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

Unified Diff: src/core/SkBitmapProcShader.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/SkBitmapHeap.cpp ('k') | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcShader.cpp
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 678a20164cc95e0472628015d5893af66244bd00..ef9cfd4dc8d4bb358cce845d86164636e089ed2b 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -79,7 +79,7 @@ SkShader::Context* SkBitmapProcShader::onCreateContext(const ContextRec& rec, vo
}
void* stateStorage = (char*)storage + sizeof(BitmapProcShaderContext);
- SkBitmapProcState* state = SkNEW_PLACEMENT(stateStorage, SkBitmapProcState);
+ SkBitmapProcState* state = new (stateStorage) SkBitmapProcState;
SkASSERT(state);
state->fTileModeX = fTileModeX;
@@ -90,7 +90,7 @@ SkShader::Context* SkBitmapProcShader::onCreateContext(const ContextRec& rec, vo
return NULL;
}
- return SkNEW_PLACEMENT_ARGS(storage, BitmapProcShaderContext, (*this, rec, state));
+ return new (storage) BitmapProcShaderContext(*this, rec, state);
}
size_t SkBitmapProcShader::contextSize() const {
@@ -302,19 +302,19 @@ SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode tmx,
SkColor color;
if (src.isNull() || bitmap_is_too_big(src)) {
if (NULL == allocator) {
- shader = SkNEW(SkEmptyShader);
+ shader = new SkEmptyShader;
} else {
shader = allocator->createT<SkEmptyShader>();
}
} else if (can_use_color_shader(src, &color)) {
if (NULL == allocator) {
- shader = SkNEW_ARGS(SkColorShader, (color));
+ shader = new SkColorShader(color);
} else {
shader = allocator->createT<SkColorShader>(color);
}
} else {
if (NULL == allocator) {
- shader = SkNEW_ARGS(SkBitmapProcShader, (src, tmx, tmy, localMatrix));
+ shader = new SkBitmapProcShader(src, tmx, tmy, localMatrix);
} else {
shader = allocator->createT<SkBitmapProcShader>(src, tmx, tmy, localMatrix);
}
« no previous file with comments | « src/core/SkBitmapHeap.cpp ('k') | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698