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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Omission with non-inverted path bounds fixed Created 7 years, 3 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
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index dcc5ab7e0bcdb080e97fbae2872e0e78e833ea0f..5f8a9f4ed22197000a7f7140d6b746184081ac8c 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -89,6 +89,7 @@ private:
kSetClip_Cmd = 4,
kClear_Cmd = 5,
kCopySurface_Cmd = 6,
+ kFillPath_Cmd = 7,
};
class DrawRecord : public DrawInfo {
@@ -106,6 +107,14 @@ private:
SkPath::FillType fFill;
};
+ struct FillPath : GrNoncopyable {
+ FillPath();
+
+ SkAutoTUnref<const GrPath> fPath;
+ SkStrokeRec fStroke;
+ SkPath::FillType fFill;
+ };
+
struct Clear : GrNoncopyable {
Clear() : fRenderTarget(NULL) {}
~Clear() { SkSafeUnref(fRenderTarget); }
@@ -129,6 +138,7 @@ private:
const SkRect* localRect,
const SkMatrix* localMatrix) SK_OVERRIDE;
virtual void onStencilPath(const GrPath*, const SkStrokeRec& stroke, SkPath::FillType) SK_OVERRIDE;
+ virtual void onFillPath(const GrPath*, const SkStrokeRec& stroke, SkPath::FillType) SK_OVERRIDE;
virtual bool onReserveVertexSpace(size_t vertexSize,
int vertexCount,
void** vertices) SK_OVERRIDE;
@@ -171,6 +181,7 @@ private:
void recordClip();
DrawRecord* recordDraw(const DrawInfo&);
StencilPath* recordStencilPath();
+ FillPath* recordFillPath();
Clear* recordClear();
CopySurface* recordCopySurface();
@@ -179,6 +190,7 @@ private:
kCmdPreallocCnt = 32,
kDrawPreallocCnt = 8,
kStencilPathPreallocCnt = 8,
+ kFillPathPreallocCnt = 8,
kStatePreallocCnt = 8,
kClipPreallocCnt = 8,
kClearPreallocCnt = 4,
@@ -189,6 +201,7 @@ private:
SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws;
GrSTAllocator<kStatePreallocCnt, StencilPath> fStencilPaths;
+ GrSTAllocator<kStatePreallocCnt, FillPath> fFillPaths;
GrSTAllocator<kStatePreallocCnt, GrDrawState::DeferredState> fStates;
GrSTAllocator<kClearPreallocCnt, Clear> fClears;
GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurfaces;
« src/gpu/GrGpu.cpp ('K') | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698