Package com.sun.glass.ui.monocle
Class EGLScreen
java.lang.Object
com.sun.glass.ui.monocle.EGLScreen
- All Implemented Interfaces:
NativeScreen
-
Field Summary
Fields inherited from interface com.sun.glass.ui.monocle.NativeScreen
framebufferSwapLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDepth()Returns the bit depth of the screen/intgetDPI()Returns the number of pixels per inch in the screen.intReturns the pixel height of the screen.intReturns the native format of the screen, as a constant from the Pixels class.longReturns a native handle for the screen.intReturns the horizontal start position of this screen relative to the total combined screen size.intReturns the vertical start position of this screen relative to the total combined screen size.floatgetScale()Return the scale factor between the physical pixels and the logical pixels e.g. hdpi = 1.5, xhdpi = 2.0Returns a read-only ByteBuffer in the native pixel format containing the screen contents.intgetWidth()Returns the pixel width of the screen.voidshutdown()Called during JavaFX shutdown to release the screen.voidCalled on the JavaFX application thread when pixel data for all windows has been uploaded.voiduploadPixels(Buffer b, int x, int y, int width, int height, float alpha) Uploads a pixel buffer to the screen.
-
Constructor Details
-
EGLScreen
public EGLScreen(int idx)
-
-
Method Details
-
getDepth
public int getDepth()Description copied from interface:NativeScreenReturns the bit depth of the screen/- Specified by:
getDepthin interfaceNativeScreen
-
getNativeFormat
public int getNativeFormat()Description copied from interface:NativeScreenReturns the native format of the screen, as a constant from the Pixels class.- Specified by:
getNativeFormatin interfaceNativeScreen
-
getWidth
public int getWidth()Description copied from interface:NativeScreenReturns the pixel width of the screen.- Specified by:
getWidthin interfaceNativeScreen
-
getHeight
public int getHeight()Description copied from interface:NativeScreenReturns the pixel height of the screen.- Specified by:
getHeightin interfaceNativeScreen
-
getOffsetX
public int getOffsetX()Description copied from interface:NativeScreenReturns the horizontal start position of this screen relative to the total combined screen size.- Specified by:
getOffsetXin interfaceNativeScreen
-
getOffsetY
public int getOffsetY()Description copied from interface:NativeScreenReturns the vertical start position of this screen relative to the total combined screen size.- Specified by:
getOffsetYin interfaceNativeScreen
-
getDPI
public int getDPI()Description copied from interface:NativeScreenReturns the number of pixels per inch in the screen.- Specified by:
getDPIin interfaceNativeScreen
-
getNativeHandle
public long getNativeHandle()Description copied from interface:NativeScreenReturns a native handle for the screen. The handle is platform-specific.- Specified by:
getNativeHandlein interfaceNativeScreen
-
shutdown
public void shutdown()Description copied from interface:NativeScreenCalled during JavaFX shutdown to release the screen. Called only once.- Specified by:
shutdownin interfaceNativeScreen
-
uploadPixels
Description copied from interface:NativeScreenUploads a pixel buffer to the screen. Called on the JavaFX application thread.- Specified by:
uploadPixelsin interfaceNativeScreen- Parameters:
b- Pixel data, in BYTE_BGRA_PRE format. The byte stride of the data is equal to width * 4.x- The X offset of the pixel data on the screeny- The Y offset of the pixel data on the screenwidth- The pixel width of the dataheight- The pixel height of the dataalpha- The alpha level to use to compose the data over existing pixels
-
swapBuffers
public void swapBuffers()Description copied from interface:NativeScreenCalled on the JavaFX application thread when pixel data for all windows has been uploaded.- Specified by:
swapBuffersin interfaceNativeScreen
-
getScreenCapture
Description copied from interface:NativeScreenReturns a read-only ByteBuffer in the native pixel format containing the screen contents.- Specified by:
getScreenCapturein interfaceNativeScreen- Returns:
- ByteBuffer a read-only ByteBuffer containing the screen contents
-
getScale
public float getScale()Description copied from interface:NativeScreenReturn the scale factor between the physical pixels and the logical pixels e.g. hdpi = 1.5, xhdpi = 2.0- Specified by:
getScalein interfaceNativeScreen
-