const GrGeometryProcessor* gp,
const GrDrawTarget::DrawInfo& info,
const GrDrawTarget::PipelineInfo& pipelineInfo) {
-#ifdef USE_BITMAP_TEXTBLOBS
- SkFAIL("Non-batch no longer supported\n");
-#endif
SkASSERT(info.vertexBuffer() && (!info.isIndexed() || info.indexBuffer()));
- CLOSE_BATCH
+ this->closeBatch();
if (!this->setupPipelineAndShouldDraw(iodb, gp, pipelineInfo)) {
return NULL;
SkASSERT(&fCmdBuffer.back() == fDrawBatch);
if (!fDrawBatch->fBatch->combineIfPossible(batch)) {
- CLOSE_BATCH
+ this->closeBatch();
fDrawBatch = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, DrawBatch, (batch, &fBatchTarget));
}
const GrPath* path,
const GrScissorState& scissorState,
const GrStencilSettings& stencilSettings) {
- CLOSE_BATCH
+ this->closeBatch();
StencilPath* sp = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, StencilPath,
(path, pipelineBuilder.getRenderTarget()));
const GrPath* path,
const GrStencilSettings& stencilSettings,
const GrDrawTarget::PipelineInfo& pipelineInfo) {
- CLOSE_BATCH
+ this->closeBatch();
// TODO: Only compare the subset of GrPipelineBuilder relevant to path covering?
if (!this->setupPipelineAndShouldDraw(iodb, pathProc, pipelineInfo)) {
SkASSERT(pathRange);
SkASSERT(indexValues);
SkASSERT(transformValues);
- CLOSE_BATCH
+ this->closeBatch();
if (!this->setupPipelineAndShouldDraw(iodb, pathProc, pipelineInfo)) {
return NULL;
bool canIgnoreRect,
GrRenderTarget* renderTarget) {
SkASSERT(renderTarget);
- CLOSE_BATCH
+ this->closeBatch();
SkIRect r;
if (NULL == rect) {
bool insideClip,
GrRenderTarget* renderTarget) {
SkASSERT(renderTarget);
- CLOSE_BATCH
+ this->closeBatch();
ClearStencilClip* clr = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, ClearStencilClip, (renderTarget));
clr->fRect = rect;
GrTargetCommands::Cmd* GrTargetCommands::recordDiscard(GrInOrderDrawBuffer* iodb,
GrRenderTarget* renderTarget) {
SkASSERT(renderTarget);
- CLOSE_BATCH
+ this->closeBatch();
Clear* clr = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, Clear, (renderTarget));
clr->fColor = GrColor_ILLEGAL;
}
// TODO this is temporary while batch is being rolled out
- CLOSE_BATCH
+ this->closeBatch();
+ iodb->getVertexAllocPool()->unmap();
+ iodb->getIndexAllocPool()->unmap();
+ fBatchTarget.preFlush();
// Updated every time we find a set state cmd to reflect the current state in the playback
// stream.
SetState* currentState = NULL;
- GrGpu* gpu = iodb->getGpu();
-
-#ifdef USE_BITMAP_TEXTBLOBS
- // Loop over all batches and generate geometry
- CmdBuffer::Iter genIter(fCmdBuffer);
- while (genIter.next()) {
- if (Cmd::kDrawBatch_CmdType == genIter->type()) {
- DrawBatch* db = reinterpret_cast<DrawBatch*>(genIter.get());
- fBatchTarget.resetNumberOfDraws();
- db->execute(NULL, currentState);
- db->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws());
- } else if (Cmd::kSetState_CmdType == genIter->type()) {
- SetState* ss = reinterpret_cast<SetState*>(genIter.get());
-
- ss->execute(gpu, currentState);
- currentState = ss;
- }
- }
-#endif
-
- iodb->getVertexAllocPool()->unmap();
- iodb->getIndexAllocPool()->unmap();
- fBatchTarget.preFlush();
-
CmdBuffer::Iter iter(fCmdBuffer);
+ GrGpu* gpu = iodb->getGpu();
+
while (iter.next()) {
GrGpuTraceMarker newMarker("", -1);
SkString traceString;
}
if (Cmd::kSetState_CmdType == iter->type()) {
-#ifndef USE_BITMAP_TEXTBLOBS
SetState* ss = reinterpret_cast<SetState*>(iter.get());
ss->execute(gpu, currentState);
currentState = ss;
-#endif
} else {
iter->execute(gpu, currentState);
}
const SkIRect& srcRect,
const SkIPoint& dstPoint) {
if (iodb->getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) {
- CLOSE_BATCH
+ this->closeBatch();
CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst, src));
cs->fSrcRect = srcRect;
cs->fDstPoint = dstPoint;
fPrevState->getPipeline()->isEqual(*ss->getPipeline())) {
fCmdBuffer.pop_back();
} else {
- CLOSE_BATCH
+ this->closeBatch();
fPrevState = ss;
iodb->recordTraceMarkersIfNecessary(ss);
}