Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 362023002: Reduce integer divides in GrAllocator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: iter getters Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 34fb0a7cff58bb94dc556aa588020a320f7524f8..fd060143e5eccf8e3d9ef9a3d80d43c4a57d4555 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -212,18 +212,27 @@ private:
// TODO: Use a single allocator for commands and records
enum {
kCmdPreallocCnt = 32,
- kDrawPreallocCnt = 8,
+ kDrawPreallocCnt = 16,
kStencilPathPreallocCnt = 8,
kDrawPathPreallocCnt = 8,
kDrawPathsPreallocCnt = 8,
kStatePreallocCnt = 8,
kClipPreallocCnt = 8,
- kClearPreallocCnt = 4,
+ kClearPreallocCnt = 8,
kGeoPoolStatePreAllocCnt = 4,
kCopySurfacePreallocCnt = 4,
};
- SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
+ typedef GrTAllocator<DrawRecord> DrawAllocator;
+ typedef GrTAllocator<StencilPath> StencilPathAllocator;
+ typedef GrTAllocator<DrawPath> DrawPathAllocator;
+ typedef GrTAllocator<DrawPaths> DrawPathsAllocator;
+ typedef GrTAllocator<GrDrawState::DeferredState> StateAllocator;
+ typedef GrTAllocator<Clear> ClearAllocator;
+ typedef GrTAllocator<CopySurface> CopySurfaceAllocator;
+ typedef GrTAllocator<SkClipStack> ClipAllocator;
+ typedef GrTAllocator<SkIPoint> ClipOriginAllocator;
+
GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws;
GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilPaths;
GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath;
@@ -233,8 +242,11 @@ private:
GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurfaces;
GrSTAllocator<kClipPreallocCnt, SkClipStack> fClips;
GrSTAllocator<kClipPreallocCnt, SkIPoint> fClipOrigins;
+
SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
+ SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
+
GrDrawTarget* fDstGpu;
bool fClipSet;
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698