Use coverage stages for supersample AA resolve, edgeAA, and glyph masks. Expose a mask stage through GrPaint
Review URL: http://codereview.appspot.com/4548048/
git-svn-id: http://skia.googlecode.com/svn/trunk@1356 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrContext.h b/gpu/include/GrContext.h
index c29526a..2fecca5 100644
--- a/gpu/include/GrContext.h
+++ b/gpu/include/GrContext.h
@@ -579,11 +579,6 @@
GrPathRenderer* getPathRenderer(const GrDrawTarget*, const GrPath&, GrPathFill);
struct OffscreenRecord;
- // we currently only expose stage 0 through the paint so use stage 1. We
- // use stage 1 for the offscreen.
- enum {
- kOffscreenStage = 1,
- };
bool doOffscreenAA(GrDrawTarget* target,
const GrPaint& paint,
@@ -602,6 +597,15 @@
const GrIRect& boundRect,
OffscreenRecord* record);
+ // computes vertex layout bits based on the paint. If paint expresses
+ // a texture for a stage, the stage coords will be bound to postitions
+ // unless hasTexCoords[s]==true in which case stage s's input coords
+ // are bound to tex coord index s. hasTexCoords == NULL is a shortcut
+ // for an array where all the values are false.
+ static int PaintStageVertexLayoutBits(
+ const GrPaint& paint,
+ const bool hasTexCoords[GrPaint::kTotalStages]);
+
};
/**