void GrGpu::onDraw(const DrawInfo& info) { this->handleDirtyContext(); GrDrawState::AutoRestoreEffects are; if (!this->setupClipAndFlushState(PrimTypeToDrawType(info.primitiveType()), info.getDstCopy(), &are, info.getDevBounds())) { return; } this->onGpuDraw(info); }
void GrGpu::onDrawNonIndexed(GrPrimitiveType type, int startVertex, int vertexCount) { this->handleDirtyContext(); if (!this->setupClipAndFlushState(PrimTypeToDrawType(type))) { return; } int sVertex = startVertex; setupGeometry(&sVertex, NULL, vertexCount, 0); this->onGpuDrawNonIndexed(type, sVertex, vertexCount); }