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

Unified Diff: src/gpu/gl/GrGLGpu.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/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLGpuProgramCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 9cc699cecf26ac6517cde10c779a932a722cdbff..92cfba1c7d06e951320480ec10d96758a7389d2b 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -173,7 +173,7 @@ GrGpu* GrGLGpu::Create(GrBackendContext backendContext, const GrContextOptions&
}
GrGLContext* glContext = GrGLContext::Create(glInterface, options);
if (glContext) {
- return SkNEW_ARGS(GrGLGpu, (glContext, context));
+ return new GrGLGpu(glContext, context);
}
return NULL;
}
@@ -207,7 +207,7 @@ GrGLGpu::GrGLGpu(GrGLContext* ctx, GrContext* context)
SkDebugf("%s", this->glCaps().dump().c_str());
}
- fProgramCache = SkNEW_ARGS(ProgramCache, (this));
+ fProgramCache = new ProgramCache(this);
SkASSERT(this->glCaps().maxVertexAttributes() >= GrGeometryProcessor::kMaxVertexAttribs);
@@ -449,9 +449,9 @@ GrTexture* GrGLGpu::onWrapBackendTexture(const GrBackendTextureDesc& desc,
idDesc.fTextureID, &rtIDDesc)) {
return NULL;
}
- texture = SkNEW_ARGS(GrGLTextureRenderTarget, (this, surfDesc, idDesc, rtIDDesc));
+ texture = new GrGLTextureRenderTarget(this, surfDesc, idDesc, rtIDDesc);
} else {
- texture = SkNEW_ARGS(GrGLTexture, (this, surfDesc, idDesc));
+ texture = new GrGLTexture(this, surfDesc, idDesc);
}
if (NULL == texture) {
return NULL;
@@ -484,7 +484,7 @@ GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
desc.fSampleCnt = SkTMin(wrapDesc.fSampleCnt, this->caps()->maxSampleCount());
desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true);
- GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc));
+ GrRenderTarget* tgt = new GrGLRenderTarget(this, desc, idDesc);
if (wrapDesc.fStencilBits) {
GrGLStencilAttachment::IDDesc sbDesc;
GrGLStencilAttachment::Format format;
@@ -492,13 +492,8 @@ GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
format.fPacked = false;
format.fStencilBits = wrapDesc.fStencilBits;
format.fTotalBits = wrapDesc.fStencilBits;
- GrGLStencilAttachment* sb = SkNEW_ARGS(GrGLStencilAttachment,
- (this,
- sbDesc,
- desc.fWidth,
- desc.fHeight,
- desc.fSampleCnt,
- format));
+ GrGLStencilAttachment* sb = new GrGLStencilAttachment(
+ this, sbDesc, desc.fWidth, desc.fHeight, desc.fSampleCnt, format);
tgt->renderTargetPriv().didAttachStencilAttachment(sb);
sb->unref();
}
@@ -1083,9 +1078,9 @@ GrTexture* GrGLGpu::onCreateTexture(const GrSurfaceDesc& desc,
GL_CALL(DeleteTextures(1, &idDesc.fTextureID));
return return_null_texture();
}
- tex = SkNEW_ARGS(GrGLTextureRenderTarget, (this, desc, idDesc, rtIDDesc));
+ tex = new GrGLTextureRenderTarget(this, desc, idDesc, rtIDDesc);
} else {
- tex = SkNEW_ARGS(GrGLTexture, (this, desc, idDesc));
+ tex = new GrGLTexture(this, desc, idDesc);
}
tex->setCachedTexParams(initialTexParams, this->getResetTimestamp());
#ifdef TRACE_TEXTURE_CREATION
@@ -1143,7 +1138,7 @@ GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& desc,
}
GrGLTexture* tex;
- tex = SkNEW_ARGS(GrGLTexture, (this, desc, idDesc));
+ tex = new GrGLTexture(this, desc, idDesc);
tex->setCachedTexParams(initialTexParams, this->getResetTimestamp());
#ifdef TRACE_TEXTURE_CREATION
SkDebugf("--- new compressed texture [%d] size=(%d %d) config=%d\n",
@@ -1223,8 +1218,8 @@ bool GrGLGpu::createStencilAttachmentForRenderTarget(GrRenderTarget* rt, int wid
// whatever sizes GL gives us. In that case we query for the size.
GrGLStencilAttachment::Format format = sFmt;
get_stencil_rb_sizes(this->glInterface(), &format);
- SkAutoTUnref<GrGLStencilAttachment> sb(SkNEW_ARGS(GrGLStencilAttachment,
- (this, sbDesc, width, height, samples, format)));
+ SkAutoTUnref<GrGLStencilAttachment> sb(
+ new GrGLStencilAttachment(this, sbDesc, width, height, samples, format));
if (this->attachStencilAttachmentToRenderTarget(sb, rt)) {
fLastSuccessfulStencilFmtIdx = sIdx;
rt->renderTargetPriv().didAttachStencilAttachment(sb);
@@ -1366,7 +1361,7 @@ GrVertexBuffer* GrGLGpu::onCreateVertexBuffer(size_t size, bool dynamic) {
if (this->glCaps().useNonVBOVertexAndIndexDynamicData() && desc.fDynamic) {
desc.fID = 0;
- GrGLVertexBuffer* vertexBuffer = SkNEW_ARGS(GrGLVertexBuffer, (this, desc));
+ GrGLVertexBuffer* vertexBuffer = new GrGLVertexBuffer(this, desc);
return vertexBuffer;
} else {
GL_CALL(GenBuffers(1, &desc.fID));
@@ -1384,7 +1379,7 @@ GrVertexBuffer* GrGLGpu::onCreateVertexBuffer(size_t size, bool dynamic) {
this->notifyVertexBufferDelete(desc.fID);
return NULL;
}
- GrGLVertexBuffer* vertexBuffer = SkNEW_ARGS(GrGLVertexBuffer, (this, desc));
+ GrGLVertexBuffer* vertexBuffer = new GrGLVertexBuffer(this, desc);
return vertexBuffer;
}
return NULL;
@@ -1398,7 +1393,7 @@ GrIndexBuffer* GrGLGpu::onCreateIndexBuffer(size_t size, bool dynamic) {
if (this->glCaps().useNonVBOVertexAndIndexDynamicData() && desc.fDynamic) {
desc.fID = 0;
- GrIndexBuffer* indexBuffer = SkNEW_ARGS(GrGLIndexBuffer, (this, desc));
+ GrIndexBuffer* indexBuffer = new GrGLIndexBuffer(this, desc);
return indexBuffer;
} else {
GL_CALL(GenBuffers(1, &desc.fID));
@@ -1416,7 +1411,7 @@ GrIndexBuffer* GrGLGpu::onCreateIndexBuffer(size_t size, bool dynamic) {
this->notifyIndexBufferDelete(desc.fID);
return NULL;
}
- GrIndexBuffer* indexBuffer = SkNEW_ARGS(GrGLIndexBuffer, (this, desc));
+ GrIndexBuffer* indexBuffer = new GrGLIndexBuffer(this, desc);
return indexBuffer;
}
return NULL;
@@ -3182,7 +3177,7 @@ GrGLAttribArrayState* GrGLGpu::HWGeometryState::internalBind(GrGLGpu* gpu,
GrGLuint arrayID;
GR_GL_CALL(gpu->glInterface(), GenVertexArrays(1, &arrayID));
int attrCount = gpu->glCaps().maxVertexAttributes();
- fVBOVertexArray = SkNEW_ARGS(GrGLVertexArray, (arrayID, attrCount));
+ fVBOVertexArray = new GrGLVertexArray(arrayID, attrCount);
}
if (ibufferID) {
attribState = fVBOVertexArray->bindWithIndexBuffer(gpu, *ibufferID);
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLGpuProgramCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698