Skip to content

Commit

Permalink
Adjust LCMS substitutions for GraalVM JDK 17
Browse files Browse the repository at this point in the history
Fixes #19356
  • Loading branch information
gsmet committed Aug 20, 2021
1 parent 1a63a85 commit 8ff5ac4
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import com.oracle.svm.core.jdk.JDK16OrEarlier;

@TargetClass(className = "sun.java2d.cmm.lcms.LCMS")
@TargetClass(className = "sun.java2d.cmm.lcms.LCMS", onlyWith = JDK16OrEarlier.class)
final class Target_sun_java2d_cmm_lcms_LCMS {

@Substitute
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package io.quarkus.runtime.graal;

import java.awt.color.ICC_Profile;

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import com.oracle.svm.core.jdk.JDK17OrLater;

@TargetClass(className = "sun.java2d.cmm.lcms.LCMS", onlyWith = JDK17OrLater.class)
final class Target_sun_java2d_cmm_lcms_LCMS_JDK17 {

@Substitute
static long loadProfileNative(byte[] data, Object ref) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
static void getProfileDataNative(long ptr, byte[] data) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
static byte[] getTagNative(long profileID, int signature) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
static void setTagDataNative(long ptr, int tagSignature,
byte[] data) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
public byte[] getProfileData(Profile p) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
public byte[] getTagData(Profile p, int tagSignature) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
public void setTagData(Profile p, int tagSignature, byte[] data) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
private static long createNativeTransform(
long[] profileIDs, int renderType,
int inFormatter, boolean isInIntPacked,
int outFormatter, boolean isOutIntPacked,
Object disposerRef) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
public static void initLCMS(Class<?> Trans, Class<?> IL, Class<?> Pf) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
static synchronized LCMSProfile getProfileID(ICC_Profile profile) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@Substitute
public static void colorConvert(LCMSTransform trans,
LCMSImageLayout src,
LCMSImageLayout dest) {
throw new UnsupportedOperationException("Not implemented yet for GraalVM native images");
}

@TargetClass(className = "sun.java2d.cmm.Profile")
static final class Profile {
}

@TargetClass(className = "sun.java2d.cmm.lcms.LCMSProfile")
static final class LCMSProfile {
}

@TargetClass(className = "sun.java2d.cmm.lcms.LCMSImageLayout")
static final class LCMSImageLayout {
}

@TargetClass(className = "sun.java2d.cmm.lcms.LCMSTransform")
static final class LCMSTransform {
}

}

0 comments on commit 8ff5ac4

Please sign in to comment.