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

Unified Diff: src/effects/SkTableColorFilter.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/effects/SkRectShaderImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index f39e88a366129ca014f89f5757b27d3e3c335afc..e20f92292a4217ea9551e9f0156c1f8e76784647 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -42,9 +42,7 @@ public:
}
}
- virtual ~SkTable_ColorFilter() {
- SkDELETE(fBitmap);
- }
+ virtual ~SkTable_ColorFilter() { delete fBitmap; }
bool asComponentTable(SkBitmap* table) const override;
SkColorFilter* newComposed(const SkColorFilter* inner) const override;
@@ -259,7 +257,7 @@ SkFlattenable* SkTable_ColorFilter::CreateProc(SkReadBuffer& buffer) {
bool SkTable_ColorFilter::asComponentTable(SkBitmap* table) const {
if (table) {
if (NULL == fBitmap) {
- SkBitmap* bmp = SkNEW(SkBitmap);
+ SkBitmap* bmp = new SkBitmap;
bmp->allocPixels(SkImageInfo::MakeA8(256, 4));
uint8_t* bitmapPixels = bmp->getAddr8(0, 0);
int offset = 0;
@@ -482,7 +480,7 @@ GrFragmentProcessor* ColorTableEffect::Create(GrContext* context, SkBitmap bitma
texture.reset(SkRef(atlas->getTexture()));
}
- return SkNEW_ARGS(ColorTableEffect, (texture, atlas, row, flags));
+ return new ColorTableEffect(texture, atlas, row, flags);
}
ColorTableEffect::ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row,
@@ -507,7 +505,7 @@ void ColorTableEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
}
GrGLFragmentProcessor* ColorTableEffect::onCreateGLInstance() const {
- return SkNEW_ARGS(GLColorTableEffect, (*this));
+ return new GLColorTableEffect(*this);
}
bool ColorTableEffect::onIsEqual(const GrFragmentProcessor& other) const {
@@ -607,14 +605,14 @@ bool SkTable_ColorFilter::asFragmentProcessors(GrContext* context,
///////////////////////////////////////////////////////////////////////////////
SkColorFilter* SkTableColorFilter::Create(const uint8_t table[256]) {
- return SkNEW_ARGS(SkTable_ColorFilter, (table, table, table, table));
+ return new SkTable_ColorFilter(table, table, table, table);
}
SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256],
const uint8_t tableR[256],
const uint8_t tableG[256],
const uint8_t tableB[256]) {
- return SkNEW_ARGS(SkTable_ColorFilter, (tableA, tableR, tableG, tableB));
+ return new SkTable_ColorFilter(tableA, tableR, tableG, tableB);
}
SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter)
« no previous file with comments | « src/effects/SkRectShaderImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698