diff options
author | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-24 21:36:16 +0000 |
---|---|---|
committer | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-24 21:36:16 +0000 |
commit | dcba4c2cc30cc64f08def991376c6dab65cfb51c (patch) | |
tree | f17229202c0086678dad57d94e00b5c94fa1ffeb /src/gpu/GrMemoryPool.h | |
parent | 6e502fe0677feaf960e4a37603da3bbeada38389 (diff) |
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
Diffstat (limited to 'src/gpu/GrMemoryPool.h')
-rw-r--r-- | src/gpu/GrMemoryPool.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/GrMemoryPool.h b/src/gpu/GrMemoryPool.h index 08c9ee2bbe..d327df4152 100644 --- a/src/gpu/GrMemoryPool.h +++ b/src/gpu/GrMemoryPool.h @@ -53,12 +53,13 @@ private: 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 { |