diff options
author | 2014-11-25 11:00:56 -0800 | |
---|---|---|
committer | 2014-11-25 11:00:56 -0800 | |
commit | 55b24afc178e641e17a5664beba7ab2b4982c91a (patch) | |
tree | bfffa193f40098e0416ca05a629bd1afc2aee304 /src/gpu/GrInOrderDrawBuffer.h | |
parent | b116619028ea826b322919d176d9c87f9569d8e7 (diff) |
Add IndexType parameter to GrDrawTarget::drawPaths
Allows the caller to decide whether they sent 8, 16, or 32 bit path
indices.
BUG=skia:
Review URL: https://codereview.chromium.org/746253003
Diffstat (limited to 'src/gpu/GrInOrderDrawBuffer.h')
-rw-r--r-- | src/gpu/GrInOrderDrawBuffer.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h index 9d9f23cd1f..373c5b4d59 100644 --- a/src/gpu/GrInOrderDrawBuffer.h +++ b/src/gpu/GrInOrderDrawBuffer.h @@ -157,9 +157,10 @@ private: void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE; int fIndicesLocation; - size_t fCount; + PathIndexType fIndexType; int fTransformsLocation; - PathTransformType fTransformsType; + PathTransformType fTransformType; + int fCount; GrStencilSettings fStencilSettings; private: @@ -249,10 +250,11 @@ private: const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE; void onDrawPaths(const GrDrawState&, const GrPathRange*, - const uint32_t indices[], - int count, - const float transforms[], + const void* indices, + PathIndexType, + const float transformValues[], PathTransformType, + int count, const ScissorState&, const GrStencilSettings&, const GrDeviceCoordTexture*) SK_OVERRIDE; @@ -293,8 +295,8 @@ private: // TODO: Use a single allocator for commands and records enum { kCmdBufferInitialSizeInBytes = 8 * 1024, - kPathIdxBufferMinReserve = 64, - kPathXformBufferMinReserve = 2 * kPathIdxBufferMinReserve, + kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's + kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms kGeoPoolStatePreAllocCnt = 4, }; @@ -318,7 +320,7 @@ private: GrGpu* fDstGpu; GrVertexBufferAllocPool& fVertexPool; GrIndexBufferAllocPool& fIndexPool; - SkTDArray<uint32_t> fPathIndexBuffer; + SkTDArray<char> fPathIndexBuffer; SkTDArray<float> fPathTransformBuffer; GeoPoolStateStack fGeoPoolStateStack; bool fFlushing; |