46 protected CPlatformView pView; 47 private CGLGraphicsConfig graphicsConfig; 48 49 native void validate(int xoff, int yoff, int width, int height, boolean isOpaque); 50 51 private native void initOps(long pConfigInfo, long pPeerData, long layerPtr, 52 int xoff, int yoff, boolean isOpaque); 53 54 protected native boolean initPbuffer(long pData, long pConfigInfo, 55 boolean isOpaque, int width, int height); 56 57 protected CGLSurfaceData(CGLGraphicsConfig gc, ColorModel cm, int type, 58 int width, int height) { 59 super(gc, cm, type); 60 // TEXTURE shouldn't be scaled, it is used for managed BufferedImages. 61 scale = type == TEXTURE ? 1 : gc.getDevice().getScaleFactor(); 62 this.width = width * scale; 63 this.height = height * scale; 64 } 65 66 protected CGLSurfaceData(CPlatformView pView, CGLGraphicsConfig gc, 67 ColorModel cm, int type,int width, int height) 68 { 69 this(gc, cm, type, width, height); 70 this.pView = pView; 71 this.graphicsConfig = gc; 72 73 long pConfigInfo = gc.getNativeConfigInfo(); 74 long pPeerData = 0L; 75 boolean isOpaque = true; 76 if (pView != null) { 77 pPeerData = pView.getAWTView(); 78 isOpaque = pView.isOpaque(); 79 } 80 initOps(pConfigInfo, pPeerData, 0, 0, 0, isOpaque); 81 } 82 83 protected CGLSurfaceData(CGLLayer layer, CGLGraphicsConfig gc, 84 ColorModel cm, int type,int width, int height) 85 { | 46 protected CPlatformView pView; 47 private CGLGraphicsConfig graphicsConfig; 48 49 native void validate(int xoff, int yoff, int width, int height, boolean isOpaque); 50 51 private native void initOps(long pConfigInfo, long pPeerData, long layerPtr, 52 int xoff, int yoff, boolean isOpaque); 53 54 protected native boolean initPbuffer(long pData, long pConfigInfo, 55 boolean isOpaque, int width, int height); 56 57 protected CGLSurfaceData(CGLGraphicsConfig gc, ColorModel cm, int type, 58 int width, int height) { 59 super(gc, cm, type); 60 // TEXTURE shouldn't be scaled, it is used for managed BufferedImages. 61 scale = type == TEXTURE ? 1 : gc.getDevice().getScaleFactor(); 62 this.width = width * scale; 63 this.height = height * scale; 64 } 65 66 public boolean canRenderLCDText(SunGraphics2D sg2d) { 67 // TODO: check LCD requirements 68 return true; 69 } 70 71 protected CGLSurfaceData(CPlatformView pView, CGLGraphicsConfig gc, 72 ColorModel cm, int type,int width, int height) 73 { 74 this(gc, cm, type, width, height); 75 this.pView = pView; 76 this.graphicsConfig = gc; 77 78 long pConfigInfo = gc.getNativeConfigInfo(); 79 long pPeerData = 0L; 80 boolean isOpaque = true; 81 if (pView != null) { 82 pPeerData = pView.getAWTView(); 83 isOpaque = pView.isOpaque(); 84 } 85 initOps(pConfigInfo, pPeerData, 0, 0, 0, isOpaque); 86 } 87 88 protected CGLSurfaceData(CGLLayer layer, CGLGraphicsConfig gc, 89 ColorModel cm, int type,int width, int height) 90 { |