Skip to content

Commit f5ee963

Browse files
Jose Peredakevinrushforth
authored andcommitted
8157224: isNPOTSupported check is too strict
Reviewed-by: kcr
1 parent be22e85 commit f5ee963

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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
@@ -43,6 +43,7 @@ public class ES2Pipeline extends GraphicsPipeline {
4343
pixelFormatAttributes = new GLPixelFormat.Attributes();
4444
static final boolean msaa;
4545
static final boolean npotSupported;
46+
private static final boolean supports3D;
4647
private static boolean es2Enabled;
4748
private static boolean isEglfb = false;
4849

@@ -89,10 +90,14 @@ else if ("eglx11".equals(eglType))
8990
factories = new ES2ResourceFactory[glFactory.getAdapterCount()];
9091
msaa = glFactory.isGLExtensionSupported("GL_ARB_multisample");
9192
npotSupported = glFactory.isNPOTSupported();
93+
// 3D requires platform that has non-power of two (NPOT) support, but
94+
// also works on iOS with OpenGL ES 2.0 or greater
95+
supports3D = npotSupported || PlatformUtil.isIOS();
9296
} else {
9397
theInstance = null;
9498
msaa = false;
9599
npotSupported = false;
100+
supports3D = false;
96101
}
97102

98103
}
@@ -201,8 +206,7 @@ public void dispose() {
201206

202207
@Override
203208
public boolean is3DSupported() {
204-
// 3D requires platform that has non-power of two (NPOT) support.
205-
return npotSupported;
209+
return supports3D;
206210
}
207211

208212
@Override

0 commit comments

Comments
 (0)