RFR: 8254569: Remove hard dependency on Dispman in Monocle fb rendering

Johan Vos jvos at openjdk.java.net
Wed Nov 4 10:22:55 UTC 2020


On Tue, 3 Nov 2020 21:17:57 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Allow the EGL functionality in monocle to leverage EGL-based systems. The low-level specific details about how the EGL calls should be constructed are left out, and a native interface (egl_ext.h) is created that can be mapped to any low-level system.
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/EGLPlatform.java line 43:
> 
>> 41:     @Override
>> 42:     public synchronized AcceleratedScreen getAcceleratedScreen(int[] attributes) throws GLException {
>> 43:         return new EGLAcceleratedScreen(attributes);
> 
> Should this method cache the result so it returns a singleton (not sure, but the other `NativePlatform` subclasses, including `Dispman` do)?

Good question. In theory (e.g. on the Pi 4), there can be 2 different hardware accelerated screens, but their is no application logic in the higher layers for distributing rendering to 2 different interfaces. 
Hence, it is indeed better to cache the result.

-------------

PR: https://git.openjdk.java.net/jfx/pull/343


More information about the openjfx-dev mailing list