use of sun.java2d.InvalidPipeException in project jdk8u_jdk by JetBrains.
the class XRRenderer method validateSurface.
/**
* Common validate method, used by all XRRender functions to validate the
* destination context.
*/
private final void validateSurface(SunGraphics2D sg2d) {
XRSurfaceData xrsd;
try {
xrsd = (XRSurfaceData) sg2d.surfaceData;
} catch (ClassCastException e) {
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
}
xrsd.validateAsDestination(sg2d, sg2d.getCompClip());
xrsd.maskBuffer.validateCompositeState(sg2d.composite, sg2d.transform, sg2d.paint, sg2d);
}
use of sun.java2d.InvalidPipeException in project jdk8u_jdk by JetBrains.
the class D3DRenderer method validateContext.
@Override
protected void validateContext(SunGraphics2D sg2d) {
int ctxflags = sg2d.paint.getTransparency() == Transparency.OPAQUE ? D3DContext.SRC_IS_OPAQUE : D3DContext.NO_CONTEXT_FLAGS;
D3DSurfaceData dstData;
try {
dstData = (D3DSurfaceData) sg2d.surfaceData;
} catch (ClassCastException e) {
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
}
D3DContext.validateContext(dstData, dstData, sg2d.getCompClip(), sg2d.composite, null, sg2d.paint, sg2d, ctxflags);
}
use of sun.java2d.InvalidPipeException in project jdk8u_jdk by JetBrains.
the class D3DRenderer method copyArea.
void copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy) {
rq.lock();
try {
int ctxflags = sg2d.surfaceData.getTransparency() == Transparency.OPAQUE ? D3DContext.SRC_IS_OPAQUE : D3DContext.NO_CONTEXT_FLAGS;
D3DSurfaceData dstData;
try {
dstData = (D3DSurfaceData) sg2d.surfaceData;
} catch (ClassCastException e) {
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
}
D3DContext.validateContext(dstData, dstData, sg2d.getCompClip(), sg2d.composite, null, null, null, ctxflags);
rq.ensureCapacity(28);
buf.putInt(COPY_AREA);
buf.putInt(x).putInt(y).putInt(w).putInt(h);
buf.putInt(dx).putInt(dy);
} finally {
rq.unlock();
}
}
use of sun.java2d.InvalidPipeException in project jdk8u_jdk by JetBrains.
the class D3DMaskFill method validateContext.
@Override
protected void validateContext(SunGraphics2D sg2d, Composite comp, int ctxflags) {
D3DSurfaceData dstData;
try {
dstData = (D3DSurfaceData) sg2d.surfaceData;
} catch (ClassCastException e) {
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
}
D3DContext.validateContext(dstData, dstData, sg2d.getCompClip(), comp, null, sg2d.paint, sg2d, ctxflags);
}
use of sun.java2d.InvalidPipeException in project jdk8u_jdk by JetBrains.
the class GDIRenderer method drawLine.
public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2) {
int transx = sg2d.transX;
int transy = sg2d.transY;
try {
doDrawLine((GDIWindowSurfaceData) sg2d.surfaceData, sg2d.getCompClip(), sg2d.composite, sg2d.eargb, x1 + transx, y1 + transy, x2 + transx, y2 + transy);
} catch (ClassCastException e) {
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
}
}
Aggregations