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

Unified Diff: src/gpu/SkGpuDevice.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/gpu/GrTextContext.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 23151d48338745a44f3b80a3b5b07f19d4a64730..aefa38982d5f4d9ab6ef29724cd363fe290213ed 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -159,7 +159,7 @@ SkGpuDevice* SkGpuDevice::Create(GrRenderTarget* rt, int width, int height,
if (!CheckAlphaTypeAndGetFlags(NULL, init, &flags)) {
return NULL;
}
- return SkNEW_ARGS(SkGpuDevice, (rt, width, height, props, flags));
+ return new SkGpuDevice(rt, width, height, props, flags);
}
SkGpuDevice* SkGpuDevice::Create(GrContext* context, SkSurface::Budgeted budgeted,
@@ -175,7 +175,7 @@ SkGpuDevice* SkGpuDevice::Create(GrContext* context, SkSurface::Budgeted budgete
return NULL;
}
- return SkNEW_ARGS(SkGpuDevice, (rt, info.width(), info.height(), props, flags));
+ return new SkGpuDevice(rt, info.width(), info.height(), props, flags);
}
SkGpuDevice::SkGpuDevice(GrRenderTarget* rt, int width, int height,
@@ -192,7 +192,7 @@ SkGpuDevice::SkGpuDevice(GrRenderTarget* rt, int width, int height,
SkAlphaType at = fOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
SkImageInfo info = rt->surfacePriv().info(at).makeWH(width, height);
- SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef, (info, rt));
+ SkPixelRef* pr = new SkGrPixelRef(info, rt);
fLegacyBitmap.setInfo(info);
fLegacyBitmap.setPixelRef(pr)->unref();
@@ -370,7 +370,7 @@ void SkGpuDevice::replaceRenderTarget(bool shouldRetainContent) {
kPremul_SkAlphaType);
SkASSERT(info == fLegacyBitmap.info());
#endif
- SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef, (fLegacyBitmap.info(), fRenderTarget));
+ SkPixelRef* pr = new SkGrPixelRef(fLegacyBitmap.info(), fRenderTarget);
fLegacyBitmap.setPixelRef(pr)->unref();
fDrawContext.reset(SkRef(fRenderTarget->getContext()->drawContext(&this->surfaceProps())));
@@ -668,7 +668,7 @@ void SkGpuDevice::drawOval(const SkDraw& draw, const SkRect& oval,
static SkBitmap wrap_texture(GrTexture* texture, int width, int height) {
SkBitmap result;
result.setInfo(SkImageInfo::MakeN32Premul(width, height));
- result.setPixelRef(SkNEW_ARGS(SkGrPixelRef, (result.info(), texture)))->unref();
+ result.setPixelRef(new SkGrPixelRef(result.info(), texture))->unref();
return result;
}
@@ -1630,7 +1630,7 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
//number of indices for lines per triangle with kLines
indexCount = triangleCount * 6;
- outAlloc.reset(SkNEW_ARRAY(uint16_t, indexCount));
+ outAlloc.reset(new uint16_t[indexCount]);
outIndices = outAlloc.get();
uint16_t* auxIndices = outAlloc.get();
int i = 0;
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698