Comments (6)
https://twitter.com/dbg_nsk/status/1061467605221982209
The usage of Reference#reachabilityFence can be abstracted and replaced with Objects#requireNonNull or a no-op function. Hotspots JIT will still function the same but it was not defined in the spec till Java 9+ with an addition of the function in the stdlib.
public static void reachabilityFence(Object ref) {
// Does nothing. This method is annotated with @ForceInline to eliminate
// most of the overhead that using @DontInline would cause with the
// HotSpot JVM, when this fence is used in a wide variety of situations.
// HotSpot JVM retains the ref and does not GC it before a call to
// this method, because the JIT-compilers do not have GC-only safepoints.
}
Creating an equivalent function such as defined in Java 9+ will have the same functionality on hotspot for Java 8 but using Objects#requireNonNull may work on other JVMs such as IBM JVM if they don't function the same but that is very unlikely.
from skija.
This does seem to be enough to get the shared java sources to compile with about 10 minutes of work. Multi-release jar files may also be useful but regular abstraction will work perfectly fine and maybe is the better solution to the problem.
from skija.
Would be great if you could check with all the other JVMs before going in
from skija.
There are only two major desktop JVMs that follow spec closely but the JVM that is the most used is Hotspot. The only real way to test this is by testing the example projects before and after but it may be possible that Skija in its current form may not even work with the IBM JVM or have horrible performance such as the case with LWJGL but that may have changed.
from skija.
The test case that forced us to add reachabilityFence
is described here JetBrains/compose-multiplatform#124
from skija.
Java 8 support is available in 0.109.0, I think we can close this issue.
from skija.
Related Issues (20)
- sun.misc.Cleaner class not found HOT 4
- [Feature request] Build a windows release without Direct3D dependency HOT 6
- FR: Native wayland support? HOT 3
- Add a linux arm64 build HOT 6
- LWJGL, JRE Exception: Access Violation @ DirectContext.makeGL HOT 2
- Rect size limit? HOT 2
- Typeface._nMakeFromName returns null on linux HOT 3
- Text Style Scene in examples crashed on linux because of AssertionError HOT 3
- The performance monitor of Text Shape Bench example is abnormal on Linux HOT 1
- Force no antialiasing when painting / set texture filter quality? HOT 4
- Starting two Skija-using applications at the same time may segfault HOT 3
- [Question] Multiple windows with a shared DirectContext? HOT 9
- skija.dll fails to load (windows 10 pro / directx12 ) HOT 11
- Some path effects causing shader compilation errors on macOS HOT 2
- how to get a canvas from Image or Bitmap HOT 3
- Fat/uber Jar doesn't work because of the multi-release feature HOT 2
- Java 8 doesn't work HOT 4
- Memory Leak: Runtime Effect + Runtime generated Images HOT 2
- How to update shader uniforms? HOT 1
- How do we add Metal Kit Device to the surface and render HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skija.