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

Unified Diff: src/gpu/GrContext.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/GrCommandBuilder.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
old mode 100755
new mode 100644
index 2f334c6ba097d5a44ffeaddb93801643c195ac96..3a1ca135b2fcbebd1de9fe54ef1abfe00ee417ec
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -64,9 +64,9 @@ void GrContext::DrawingMgr::init(GrContext* context) {
fContext = context;
#ifdef IMMEDIATE_MODE
- fDrawTarget = SkNEW_ARGS(GrImmediateDrawTarget, (context));
+ fDrawTarget = new GrImmediateDrawTarget(context);
#else
- fDrawTarget = SkNEW_ARGS(GrBufferedDrawTarget, (context));
+ fDrawTarget = new GrBufferedDrawTarget(context);
#endif
}
@@ -122,7 +122,7 @@ GrDrawContext* GrContext::DrawingMgr::drawContext(const SkSurfaceProps* surfaceP
SkASSERT(props.pixelGeometry() < kNumPixelGeometries);
if (!fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()]) {
fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()] =
- SkNEW_ARGS(GrDrawContext, (fContext, fDrawTarget, props));
+ new GrDrawContext(fContext, fDrawTarget, props);
}
return fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()];
@@ -138,7 +138,7 @@ GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext)
GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext,
const GrContextOptions& options) {
- GrContext* context = SkNEW(GrContext);
+ GrContext* context = new GrContext;
if (context->init(backend, backendContext, options)) {
return context;
@@ -182,20 +182,20 @@ bool GrContext::init(GrBackend backend, GrBackendContext backendContext,
void GrContext::initCommon() {
fCaps = SkRef(fGpu->caps());
- fResourceCache = SkNEW_ARGS(GrResourceCache, (fCaps));
+ fResourceCache = new GrResourceCache(fCaps);
fResourceCache->setOverBudgetCallback(OverBudgetCB, this);
- fResourceProvider = SkNEW_ARGS(GrResourceProvider, (fGpu, fResourceCache));
+ fResourceProvider = new GrResourceProvider(fGpu, fResourceCache);
- fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this)));
+ fLayerCache.reset(new GrLayerCache(this));
fDidTestPMConversions = false;
fDrawingMgr.init(this);
// GrBatchFontCache will eventually replace GrFontCache
- fBatchFontCache = SkNEW_ARGS(GrBatchFontCache, (this));
+ fBatchFontCache = new GrBatchFontCache(this);
- fTextBlobCache.reset(SkNEW_ARGS(GrTextBlobCache, (TextBlobCacheOverBudgetCB, this)));
+ fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this));
}
GrContext::~GrContext() {
@@ -212,9 +212,9 @@ GrContext::~GrContext() {
(*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo);
}
- SkDELETE(fResourceProvider);
- SkDELETE(fResourceCache);
- SkDELETE(fBatchFontCache);
+ delete fResourceProvider;
+ delete fResourceCache;
+ delete fBatchFontCache;
fGpu->unref();
fCaps->unref();
@@ -645,7 +645,7 @@ GrPathRenderer* GrContext::getPathRenderer(const GrDrawTarget* target,
GrPathRendererChain::StencilSupport* stencilSupport) {
if (!fPathRendererChain) {
- fPathRendererChain = SkNEW_ARGS(GrPathRendererChain, (this));
+ fPathRendererChain = new GrPathRendererChain(this);
}
GrPathRenderer* pr = fPathRendererChain->getPathRenderer(target,
@@ -658,7 +658,7 @@ GrPathRenderer* GrContext::getPathRenderer(const GrDrawTarget* target,
if (!pr && allowSW) {
if (!fSoftwarePathRenderer) {
- fSoftwarePathRenderer = SkNEW_ARGS(GrSoftwarePathRenderer, (this));
+ fSoftwarePathRenderer = new GrSoftwarePathRenderer(this);
}
pr = fSoftwarePathRenderer;
}
« no previous file with comments | « src/gpu/GrCommandBuilder.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698