Make all GrContext draws go through the draw buffer.
Review URL: http://codereview.appspot.com/6462069/
git-svn-id: http://skia.googlecode.com/svn/trunk@5136 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 0c4d73c..c32b908 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -748,12 +748,12 @@
bool allowSW);
private:
- // used to keep track of when we need to flush the draw buffer
- enum DrawCategory {
- kBuffered_DrawCategory, // last draw was inserted in draw buffer
- kUnbuffered_DrawCategory, // last draw was not inserted in the draw buffer
+ // Used to indicate whether a draw should be performed immediately or queued in fDrawBuffer.
+ enum BufferedDraw {
+ kYes_BufferedDraw,
+ kNo_BufferedDraw,
};
- DrawCategory fLastDrawCategory;
+ BufferedDraw fLastDrawWasBuffered;
GrGpu* fGpu;
GrDrawState* fDrawState;
@@ -778,7 +778,7 @@
void setPaint(const GrPaint& paint);
- GrDrawTarget* prepareToDraw(const GrPaint& paint, DrawCategory drawType);
+ GrDrawTarget* prepareToDraw(const GrPaint&, BufferedDraw);
void internalDrawPath(const GrPaint& paint, const SkPath& path,
GrPathFill fill, const GrPoint* translate);