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

Unified Diff: src/gpu/gl/GrGLCreateNullInterface.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/GrGLContext.cpp ('k') | src/gpu/gl/GrGLExtensions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCreateNullInterface.cpp
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 886aacdcb8381e2845fda8301e92baaa9a4d6a04..37d02850098ccfe47a189b2dc2a9a884fff4998b 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -24,16 +24,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; }
@@ -82,14 +82,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;
}
@@ -100,7 +100,7 @@ public:
SkASSERT(fBuffers.count() > 0);
GrGLuint id = buffer->id();
- SkDELETE(buffer);
+ delete buffer;
fBuffers[id] = reinterpret_cast<BufferObj*>(fFreeListHead);
fFreeListHead = id;
@@ -141,8 +141,8 @@ public:
, fCurrShaderID(0) {}
private:
- static void* Create() { return SkNEW(ThreadContext ); }
- static void Delete(void* context) { SkDELETE(reinterpret_cast<ThreadContext *>(context)); }
+ static void* Create() { return new ThreadContext; }
+ static void Delete(void* context) { delete reinterpret_cast<ThreadContext*>(context); }
};
// Functions not declared in GrGLBogusInterface.h (not common with the Debug GL interface).
@@ -343,7 +343,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLGetBufferParameteriv(GrGLenum target, GrGLenu
} // end anonymous namespace
const GrGLInterface* GrGLCreateNullInterface() {
- GrGLInterface* interface = SkNEW(GrGLInterface);
+ GrGLInterface* interface = new GrGLInterface;
interface->fStandard = kGL_GrGLStandard;
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGLExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698