aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/debug/GrDebugGL.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-31 19:23:02 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-31 19:23:02 +0000
commit622a17091b69df8d54d318c88f34851677a6d9c2 (patch)
treee9cf15c0b88a2b5959b31994bd968c138d41b9bb /src/gpu/gl/debug/GrDebugGL.cpp
parent641f8b19a6799b6d73ac17b9c2d2f8a5e6f5ad4d (diff)
Fixed minor memory leaks
Diffstat (limited to 'src/gpu/gl/debug/GrDebugGL.cpp')
-rw-r--r--src/gpu/gl/debug/GrDebugGL.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/gl/debug/GrDebugGL.cpp b/src/gpu/gl/debug/GrDebugGL.cpp
index c4cfe896fc..657003967f 100644
--- a/src/gpu/gl/debug/GrDebugGL.cpp
+++ b/src/gpu/gl/debug/GrDebugGL.cpp
@@ -16,7 +16,8 @@
#include "GrTextureUnitObj.h"
-GrDebugGL GrDebugGL::Obj;
+GrDebugGL* GrDebugGL::gObj = NULL;
+int GrDebugGL::gStaticRefCount = 0;
GrDebugGL::Create GrDebugGL::gFactoryFunc[kObjTypeCount] = {
GrTextureObj::createGrTextureObj,
GrBufferObj::createGrBufferObj,
@@ -40,7 +41,9 @@ GrDebugGL::GrDebugGL()
, fTexture(NULL) {
for (int i = 0; i < kDefaultMaxTextureUnits; ++i) {
- fTextureUnits[i] = GR_CREATE(GrTextureUnitObj, GrDebugGL::kTextureUnit_ObjTypes);
+
+ fTextureUnits[i] = reinterpret_cast<GrTextureUnitObj *>(
+ createObj(GrDebugGL::kTextureUnit_ObjTypes));
fTextureUnits[i]->ref();
fTextureUnits[i]->setNumber(i);