< prev index next >

src/java.desktop/share/native/libawt/awt/image/dither.c

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -21,18 +21,20 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
+#include "jni.h"
 #include "dither.h"
 
-sgn_ordered_dither_array std_img_oda_red;
-sgn_ordered_dither_array std_img_oda_green;
-sgn_ordered_dither_array std_img_oda_blue;
-int std_odas_computed = 0;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_red;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_green;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_blue;
+JNIEXPORT int std_odas_computed = 0;
 
-void initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) {
+JNIEXPORT void JNICALL
+initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) {
     int *inverse;
     int lastindex, lastgray, missing, i;
 
     if (!cData) {
         return;

@@ -265,11 +267,12 @@
         std_odas_computed = 1;
     }
 
 }
 
-void make_dither_arrays(int cmapsize, ColorData *cData) {
+JNIEXPORT void JNICALL
+make_dither_arrays(int cmapsize, ColorData *cData) {
     int i, j, k;
 
     /*
      * Initialize the per-component ordered dithering arrays
      * Choose a size based on how far between elements in the
< prev index next >