Use GrMemoryPool to manage GrCustomStage allocations.
Improve memory reclamation of GrMemoryPool for new/delete/new/delete pattern.

http://codereview.appspot.com/6438046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4744 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrMemoryPool.h b/src/gpu/GrMemoryPool.h
index 08c9ee2..d327df4 100644
--- a/src/gpu/GrMemoryPool.h
+++ b/src/gpu/GrMemoryPool.h
@@ -53,12 +53,13 @@
     void validate();
 
     struct BlockHeader {
-        BlockHeader* fNext;      // doubly-linked list of blocks.
+        BlockHeader* fNext;      ///< doubly-linked list of blocks.
         BlockHeader* fPrev;
-        int          fLiveCount; // number of outstanding allocations in the
-                                 // block.
-        intptr_t     fCurrPtr;   // ptr to the start of blocks free space.
-        size_t       fFreeSize;  // amount of free space left in the block.
+        int          fLiveCount; ///< number of outstanding allocations in the
+                                 ///< block.
+        intptr_t     fCurrPtr;   ///< ptr to the start of blocks free space.
+        intptr_t     fPrevPtr;   ///< ptr to the last allocation made
+        size_t       fFreeSize;  ///< amount of free space left in the block.
     };
 
     enum {