mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JRE-12 CCE: XRTextRenderer.drawGlyphList (sun.java2d.NullSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData)
Throwing InvalidPipeException for incompatible surfaces
(cherry picked from commit f98f34c)
(cherry picked from commit fb2bbc47fe)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
ce2af57e84
commit
eb1a8e6ed8
@@ -26,6 +26,7 @@
|
||||
package sun.font;
|
||||
|
||||
import sun.awt.*;
|
||||
import sun.java2d.InvalidPipeException;
|
||||
import sun.java2d.SunGraphics2D;
|
||||
import sun.java2d.pipe.GlyphListPipe;
|
||||
import sun.java2d.xr.*;
|
||||
@@ -61,8 +62,12 @@ public class XRTextRenderer extends GlyphListPipe {
|
||||
|
||||
try {
|
||||
SunToolkit.awtLock();
|
||||
|
||||
XRSurfaceData x11sd = (XRSurfaceData) sg2d.surfaceData;
|
||||
XRSurfaceData x11sd;
|
||||
try {
|
||||
x11sd = (XRSurfaceData) sg2d.surfaceData;
|
||||
} catch (ClassCastException e) {
|
||||
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
|
||||
}
|
||||
x11sd.validateAsDestination(null, sg2d.getCompClip());
|
||||
x11sd.maskBuffer.validateCompositeState(sg2d.composite, sg2d.transform, sg2d.paint, sg2d);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user