Skip to content

Commit 1ad11b0

Browse files
author
Johan Vos
committed
8278595: Provide more information when a pipeline can't be used
Reviewed-by: kcr
1 parent 1158339 commit 1ad11b0

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

modules/javafx.graphics/src/main/java/com/sun/prism/GraphicsPipeline.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,13 @@ public static GraphicsPipeline createPipeline() {
235235
newPipeline = null;
236236
}
237237
if (PrismSettings.verbose) {
238-
System.err.println("GraphicsPipeline.createPipeline: error"+
239-
" initializing pipeline "+ className);
238+
System.err.println("GraphicsPipeline.createPipeline: error" +
239+
" initializing pipeline " + className);
240+
if (newPipeline == null) {
241+
System.err.println("Reason: could not create an instance");
242+
} else {
243+
System.err.println("Reason: could not initialize the instance");
244+
}
240245
}
241246
} catch (Throwable t) {
242247
if (PrismSettings.verbose) {

modules/javafx.graphics/src/main/java/com/sun/prism/es2/ES2Pipeline.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@ public class ES2Pipeline extends GraphicsPipeline {
7575
if (glFactory != null) {
7676
es2Enabled = glFactory.initialize(PrismSettings.class,
7777
pixelFormatAttributes);
78+
if (!es2Enabled && PrismSettings.verbose) {
79+
System.out.println("GLFactory " + glFactory + " could not be initialized. ES2Pipeline not available.");
80+
}
7881
} else {
82+
if (PrismSettings.verbose) {
83+
System.out.println("No GLFactory found. ES2Pipeline not available.");
84+
}
7985
es2Enabled = false;
8086
}
81-
8287
if (es2Enabled) {
8388
theInstance = new ES2Pipeline();
8489
factories = new ES2ResourceFactory[glFactory.getAdapterCount()];
@@ -93,7 +98,6 @@ public class ES2Pipeline extends GraphicsPipeline {
9398
npotSupported = false;
9499
supports3D = false;
95100
}
96-
97101
}
98102
private static Thread creator;
99103
private static final ES2Pipeline theInstance;

0 commit comments

Comments
 (0)