I dunno if it makes sense, but having a map<color, vector<BatchDraw> > would make this more efficient.  You'd then have K batchdraw vectors to hand off rather than one in End().