8227392: Colors with alpha are painted incorrectly on Linux, after JDK-8214579
8224825: java/awt/Color/AlphaColorTest.java fails in linux-x64 system Reviewed-by: prr
This commit is contained in:
parent
c0d870559f
commit
cf5433ff56
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -54,7 +54,6 @@ import sun.java2d.pipe.Region;
|
||||
import sun.java2d.pipe.ShapeDrawPipe;
|
||||
import sun.java2d.pipe.TextPipe;
|
||||
import sun.java2d.pipe.ValidatePipe;
|
||||
import sun.java2d.x11.X11SurfaceData;
|
||||
import sun.java2d.x11.XSurfaceData;
|
||||
import sun.font.FontManagerNativeLibrary;
|
||||
|
||||
@ -244,7 +243,7 @@ public abstract class XRSurfaceData extends XSurfaceData {
|
||||
*/
|
||||
public static XRWindowSurfaceData createData(X11ComponentPeer peer) {
|
||||
XRGraphicsConfig gc = getGC(peer);
|
||||
return new XRWindowSurfaceData(peer, gc, X11SurfaceData.getSurfaceType(gc, Transparency.OPAQUE));
|
||||
return new XRWindowSurfaceData(peer, gc, gc.getSurfaceType());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,7 +114,6 @@
|
||||
|
||||
# jdk_awt
|
||||
|
||||
java/awt/Color/AlphaColorTest.java 8224825 linux-all
|
||||
java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.java 8168389 windows-all,macosx-all
|
||||
java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java 8224055 macosx-all
|
||||
java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java 8168408 windows-all,macosx-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8204931
|
||||
* @bug 8204931 8227392 8224825
|
||||
* @summary test alpha colors are blended with background.
|
||||
*/
|
||||
|
||||
@ -73,8 +73,14 @@ public class AlphaColorTest extends Component {
|
||||
|
||||
static Frame frame;
|
||||
private static void createAndShowGUI() {
|
||||
frame = new Frame("Alpha Color Test");
|
||||
frame.setBackground(Color.black);
|
||||
frame = new Frame("Alpha Color Test") {
|
||||
@Override
|
||||
public void paint(Graphics g) {
|
||||
g.setColor(Color.black);
|
||||
g.fillRect(0, 0, getWidth(), getHeight());
|
||||
super.paint(g);
|
||||
}
|
||||
};
|
||||
Color color = new Color(255, 255, 255, 127);
|
||||
frame.add("Center", new AlphaColorTest(color));
|
||||
frame.pack();
|
||||
|
Loading…
Reference in New Issue
Block a user