aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrInOrderDrawBuffer.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-27 19:10:05 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-27 19:10:05 +0000
commit92669014aa7ab821cdc09cc9ad610316eb16b490 (patch)
treea33fcb3135749e84812d9e4b5e0549e0fdca53f5 /gpu/src/GrInOrderDrawBuffer.h
parentc12e1b138e736f70d698f14a3ffc74af6f3d8621 (diff)
Add SkSTArray, hide stack storage cons in SkTArray, unify SkTArray init logic
Review URL: http://codereview.appspot.com/5127044/ git-svn-id: http://skia.googlecode.com/svn/trunk@2342 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrInOrderDrawBuffer.h')
-rw-r--r--gpu/src/GrInOrderDrawBuffer.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/gpu/src/GrInOrderDrawBuffer.h b/gpu/src/GrInOrderDrawBuffer.h
index f0b5c9ef4d..122be53997 100644
--- a/gpu/src/GrInOrderDrawBuffer.h
+++ b/gpu/src/GrInOrderDrawBuffer.h
@@ -161,6 +161,15 @@ private:
GrVertexBufferAllocPool& fVertexPool;
GrIndexBufferAllocPool& fIndexPool;
+
+ enum {
+ kDrawPreallocCnt = 8,
+ kStatePreallocCnt = 8,
+ kClipPreallocCnt = 8,
+ kClearPreallocCnt = 4,
+ kGeoPoolStatePreAllocCnt = 4,
+ };
+
struct GeometryPoolState {
const GrVertexBuffer* fPoolVertexBuffer;
int fPoolStartVertex;
@@ -172,23 +181,12 @@ private:
size_t fUsedPoolVertexBytes;
size_t fUsedPoolIndexBytes;
};
- SkTArray<GeometryPoolState> fGeoPoolStateStack;
-
-
- enum {
- kDrawPreallocCnt = 8,
- kStatePreallocCnt = 8,
- kClipPreallocCnt = 8,
- kClearPreallocCnt = 4,
- kGeoPoolStatePreAllocCnt = 4,
- };
+ SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack;
SkAlignedSTStorage<kDrawPreallocCnt, Draw> fDrawStorage;
SkAlignedSTStorage<kStatePreallocCnt, SavedDrawState> fStateStorage;
SkAlignedSTStorage<kClipPreallocCnt, GrClip> fClipStorage;
SkAlignedSTStorage<kClearPreallocCnt, Clear> fClearStorage;
- SkAlignedSTStorage<kGeoPoolStatePreAllocCnt,
- GeometryPoolState> fGeoStackStorage;
typedef GrDrawTarget INHERITED;
};