[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] RFR: 8226384: Implement a better logic to switch between OpenGL and Metal pipel
From: Jayathirth D V <jdv () openjdk ! java ! net>
Date: 2021-05-10 10:36:57
Message-ID: AkeIbuxZYMw5I2cx5PAhoYWCFWSQyfpPo0aMkrvYGEo=.fd69b0d4-0563-4178-b907-5cbe13442108 () github ! com
[Download RAW message or body]
On Mon, 10 May 2021 10:14:40 GMT, Jayathirth D V <jdv@openjdk.org> wrote:
> > You can add a new abstract method to the parent class: getRenderQueue(), and \
> > override it in subclasses to call MTLRenderQueue/OGL.getInstance(); In this way, \
> > you can push to the parent more methods by calling just this new \
> > getRenderQueue().
> > I think the only methods which cannot be pushe dto the parent is \
> > replaceSurfaceData() due to insets usage.
>
> I tried making this change.
> Moved all methods except replaceSurfaceData() to CFLayer.java. Moved the jni native \
> declaration also to CFlayer.java. For this to link i need to change native JNI \
> signatures also to map to CFLayer. But this will result in duplicate JNI symbols. \
> If i change name of these native JNI calls to something like nativeMTL/CGLSetScale, \
> i again have to use if/else check to verify which signature to call. Introducing a \
> common native interface between MTLLayer.m and CGLLayer.m would not help because \
> their implementation is different(Also it is out of scope of this PR).
> I am not finding ways to move methods accessing native JNI calls to common CFLayer.
I will push this PR. If we find appropriate way to move more methods to CFLayer.java \
i will handle it in a separate bug.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3851
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic