Compare commits

...

1 Commits

Author SHA1 Message Date
Alexey Ushakov
754185f5f6 JBR-5645 Provide basic classes for Vulkan rendering pipeline
Fix compilation failure on macos
2023-07-10 12:54:47 +02:00
2 changed files with 13 additions and 8 deletions

View File

@@ -33,8 +33,6 @@ import sun.awt.image.SunVolatileImage;
import sun.awt.image.VolatileSurfaceManager;
import sun.java2d.opengl.GLXGraphicsConfig;
import sun.java2d.opengl.GLXVolatileSurfaceManager;
import sun.java2d.vulkan.WLVKGraphicsConfig;
import sun.java2d.vulkan.WLVKVolatileSurfaceManager;
import sun.java2d.wl.WLVolatileSurfaceManager;
import sun.java2d.x11.X11VolatileSurfaceManager;
import sun.java2d.xr.*;
@@ -66,10 +64,8 @@ public class UnixSurfaceManagerFactory extends SurfaceManagerFactory {
return new XRVolatileSurfaceManager(vImg, context);
} else if (gc instanceof X11GraphicsConfig){
return new X11VolatileSurfaceManager(vImg, context);
} else if (gc instanceof WLVKGraphicsConfig) {
return new WLVKVolatileSurfaceManager(vImg, context);
} else {
return new WLVolatileSurfaceManager(vImg, context);
return WLVolatileSurfaceManager.createVolatileManager(vImg, context);
}
}

View File

@@ -28,18 +28,27 @@ package sun.java2d.wl;
import java.awt.GraphicsConfiguration;
import java.awt.ImageCapabilities;
import java.awt.Transparency;
import java.awt.image.ColorModel;
import sun.awt.wl.WLGraphicsConfig;
import sun.awt.image.SunVolatileImage;
import sun.awt.image.VolatileSurfaceManager;
import sun.java2d.SurfaceData;
import sun.java2d.vulkan.WLVKGraphicsConfig;
import sun.java2d.vulkan.WLVKVolatileSurfaceManager;
public class WLVolatileSurfaceManager extends VolatileSurfaceManager {
public WLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
super(vImg, context);
}
public static VolatileSurfaceManager createVolatileManager(SunVolatileImage vImg,
Object context) {
GraphicsConfiguration gc = vImg.getGraphicsConfig();
if (gc instanceof WLVKGraphicsConfig) {
return new WLVKVolatileSurfaceManager(vImg, context);
} else {
return new WLVolatileSurfaceManager(vImg, context);
}
}
protected boolean isAccelerationEnabled() {
return false;
}