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

Unified Diff: src/gpu/gl/SkNullGLContext.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/SkGLContext.cpp ('k') | src/gpu/gl/builders/GrGLPathProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/SkNullGLContext.cpp
diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp
index c59fb98ad255f69d5b0c282de23b65ce95d7d93d..dddea763adb158616b59b28b91dcd8c68a4cb0be 100644
--- a/src/gpu/gl/SkNullGLContext.cpp
+++ b/src/gpu/gl/SkNullGLContext.cpp
@@ -22,16 +22,16 @@ public:
BufferObj(GrGLuint id) : fID(id), fDataPtr(NULL), fSize(0), fMapped(false) {}
- ~BufferObj() { SkDELETE_ARRAY(fDataPtr); }
+ ~BufferObj() { delete[] fDataPtr; }
void allocate(GrGLsizeiptr size, const GrGLchar* dataPtr) {
if (fDataPtr) {
SkASSERT(0 != fSize);
- SkDELETE_ARRAY(fDataPtr);
+ delete[] fDataPtr;
}
fSize = size;
- fDataPtr = SkNEW_ARRAY(char, size);
+ fDataPtr = new char[size];
}
GrGLuint id() const { return fID; }
@@ -80,14 +80,14 @@ public:
if (kFreeListEnd == fFreeListHead) {
// no free slots - create a new one
id = fBuffers.count();
- buffer = SkNEW_ARGS(BufferObj, (id));
+ buffer = new BufferObj(id);
*fBuffers.append() = buffer;
} else {
// grab the head of the free list and advance the head to the next free slot.
id = static_cast<GrGLuint>(fFreeListHead);
fFreeListHead = reinterpret_cast<intptr_t>(fBuffers[id]);
- buffer = SkNEW_ARGS(BufferObj, (id));
+ buffer = new BufferObj(id);
fBuffers[id] = buffer;
}
@@ -98,7 +98,7 @@ public:
SkASSERT(fBuffers.count() > 0);
GrGLuint id = buffer->id();
- SkDELETE(buffer);
+ delete buffer;
fBuffers[id] = reinterpret_cast<BufferObj*>(fFreeListHead);
fFreeListHead = id;
@@ -346,7 +346,7 @@ public:
} // end anonymous namespace
static GrGLInterface* create_null_interface(State* state) {
- GrGLInterface* interface = SkNEW_ARGS(NullInterface, (state));
+ GrGLInterface* interface = new NullInterface(state);
interface->fStandard = kGL_GrGLStandard;
@@ -498,7 +498,7 @@ static GrGLInterface* create_null_interface(State* state) {
//////////////////////////////////////////////////////////////////////////////
static void* create_tls() {
- State** current = SkNEW(State*);
+ State** current = new State*;
*current = NULL;
return current;
}
@@ -508,7 +508,7 @@ static void delete_tls(void* ctx) {
if (*current) {
(*current)->unref();
}
- SkDELETE(current);
+ delete current;
}
static State* current_context() {
@@ -536,16 +536,16 @@ SkNullGLContext* SkNullGLContext::Create(GrGLStandard forcedGpuAPI) {
if (kGLES_GrGLStandard == forcedGpuAPI) {
return NULL;
}
- SkNullGLContext* ctx = SkNEW(SkNullGLContext);
+ SkNullGLContext* ctx = new SkNullGLContext;
if (!ctx->isValid()) {
- SkDELETE(ctx);
+ delete ctx;
return NULL;
}
return ctx;
}
SkNullGLContext::SkNullGLContext() {
- fState = SkNEW(ContextState);
+ fState = new ContextState;
GrGLInterface* interface = create_null_interface(fState);
this->init(interface);
#if GR_GL_PER_GL_FUNC_CALLBACK
« no previous file with comments | « src/gpu/gl/SkGLContext.cpp ('k') | src/gpu/gl/builders/GrGLPathProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698