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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 746253003: Add IndexType parameter to GrDrawTarget::drawPaths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/GrGpu.cpp ('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 9d9f23cd1f95d9269ffea7344fcb9d039dce0937..373c5b4d5937f2ebcb49df6b5efb60fd28e047f1 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;
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698