Пример #1
0
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);
}
Пример #2
0
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);
}