Minor code cleanup of Debug GL Interface

http://codereview.appspot.com/6032043/



git-svn-id: http://skia.googlecode.com/svn/trunk@3690 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/debug/GrBufferObj.cpp b/src/gpu/gl/debug/GrBufferObj.cpp
index 0cd4fc8..7d605eb 100644
--- a/src/gpu/gl/debug/GrBufferObj.cpp
+++ b/src/gpu/gl/debug/GrBufferObj.cpp
@@ -7,3 +7,25 @@
  */
 
 #include "GrBufferObj.h"
+
+void GrBufferObj::allocate(GrGLint size, const GrGLchar *dataPtr) {
+    GrAlwaysAssert(size >= 0);
+
+    // delete pre-existing data
+    delete[] fDataPtr;
+
+    fSize = size;
+    fDataPtr = new GrGLchar[size];
+    if (dataPtr) {
+        memcpy(fDataPtr, dataPtr, fSize);
+    }
+    // TODO: w/ no dataPtr the data is unitialized - this could be tracked
+}
+
+void GrBufferObj::deleteAction() {
+
+    // buffers are automatically unmapped when deleted
+    this->resetMapped();
+
+    this->INHERITED::deleteAction();
+}