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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 209413006: Make it possible to draw multiple paths at once to a draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comment Created 6 years, 9 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/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 60e01f01b970b802c2f819b1eb61661a7c0fd670..457648418160d9cbffc9613c1f50359fbfa2ba4f 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -88,6 +88,7 @@ private:
kClear_Cmd = 5,
kCopySurface_Cmd = 6,
kDrawPath_Cmd = 7,
+ kDrawPaths_Cmd = 8,
};
class DrawRecord : public DrawInfo {
@@ -112,6 +113,18 @@ private:
GrDeviceCoordTexture fDstCopy;
};
+ struct DrawPaths : public ::SkNoncopyable {
+ DrawPaths();
+ ~DrawPaths();
+
+ size_t fPathCount;
+ const GrPath** fPaths;
+ SkMatrix* fTransforms;
+ SkPath::FillType fFill;
+ SkStrokeRec::Style fStroke;
+ GrDeviceCoordTexture fDstCopy;
+ };
+
struct Clear : public ::SkNoncopyable {
Clear() : fRenderTarget(NULL) {}
~Clear() { SkSafeUnref(fRenderTarget); }
@@ -139,6 +152,9 @@ private:
virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
virtual void onDrawPath(const GrPath*, SkPath::FillType,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
+ virtual void onDrawPaths(size_t, const GrPath**, const SkMatrix*,
+ SkPath::FillType, SkStrokeRec::Style,
+ const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
virtual bool onReserveVertexSpace(size_t vertexSize,
int vertexCount,
@@ -188,6 +204,7 @@ private:
DrawRecord* recordDraw(const DrawInfo&);
StencilPath* recordStencilPath();
DrawPath* recordDrawPath();
+ DrawPaths* recordDrawPaths();
Clear* recordClear();
CopySurface* recordCopySurface();
@@ -197,6 +214,7 @@ private:
kDrawPreallocCnt = 8,
kStencilPathPreallocCnt = 8,
kDrawPathPreallocCnt = 8,
+ kDrawPathsPreallocCnt = 8,
kStatePreallocCnt = 8,
kClipPreallocCnt = 8,
kClearPreallocCnt = 4,
@@ -206,8 +224,9 @@ private:
SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws;
- GrSTAllocator<kStatePreallocCnt, StencilPath> fStencilPaths;
- GrSTAllocator<kStatePreallocCnt, DrawPath> fDrawPaths;
+ GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilPaths;
+ GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath;
+ GrSTAllocator<kDrawPathsPreallocCnt, DrawPaths> fDrawPaths;
GrSTAllocator<kStatePreallocCnt, GrDrawState::DeferredState> fStates;
GrSTAllocator<kClearPreallocCnt, Clear> fClears;
GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurfaces;
« 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