}
if (p.npoints > 1) {
drawPolyline(sg2d, p.xpoints, p.ypoints, p.npoints);
}
} else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) {
ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
try {
synchronized (D3DContext.LOCK) {
int ctxflags = (sg2d.eargb >>> 24) == 0xff ?
SRC_IS_OPAQUE : NO_CONTEXT_FLAGS;
// in this case the spans will be pre-transformed, so we
// pass null transform to getContext
long pCtx = D3DContext.getContext(null, sg2d.surfaceData,
sg2d.getCompClip(),
sg2d.getComposite(),
null /*transform*/,
sg2d.eargb/*pixel*/,
ctxflags);
devFillSpans(sg2d.surfaceData.getNativeOps(), pCtx, si,
si.getNativeIterator(), 0, 0);
}
} finally {
si.dispose();
}
} else {
fill(sg2d, sg2d.stroke.createStrokedShape(s));
}
}