8165345: JDK macro definition re-defined by MacOS core framework
Reviewed-by: serb
--- a/jdk/src/java.desktop/share/native/libfontmanager/HBShaper.c Tue Sep 06 13:03:00 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/HBShaper.c Tue Sep 06 08:32:50 2016 -0700
@@ -80,7 +80,7 @@
int i, needToGrow;
float x=0, y=0;
float startX, startY, advX, advY;
- float scale = 1.0f / FloatToFixedScale / devScale;
+ float scale = 1.0f / HBFloatToFixedScale / devScale;
unsigned int* glyphs;
float* positions;
int initialCount, glyphArrayLen, posArrayLen, maxGlyphs, storeadv, maxStore;
--- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc Tue Sep 06 13:03:00 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc Tue Sep 06 08:32:50 2016 -0700
@@ -80,7 +80,7 @@
fadv *= jdkFontInfo->devScale;
env->DeleteLocalRef(pt);
- return FloatToFixed(fadv);
+ return HBFloatToFixed(fadv);
}
static hb_position_t
@@ -107,7 +107,7 @@
fadv = env->GetFloatField(pt, sunFontIDs.yFID);
env->DeleteLocalRef(pt);
- return FloatToFixed(fadv);
+ return HBFloatToFixed(fadv);
}
@@ -201,8 +201,8 @@
*x = 0; *y = 0;
return true;
}
- *x = FloatToFixed(env->GetFloatField(pt, sunFontIDs.xFID));
- *y = FloatToFixed(env->GetFloatField(pt, sunFontIDs.yFID));
+ *x = HBFloatToFixed(env->GetFloatField(pt, sunFontIDs.xFID));
+ *y = HBFloatToFixed(env->GetFloatField(pt, sunFontIDs.yFID));
env->DeleteLocalRef(pt);
return true;
@@ -321,8 +321,8 @@
_hb_jdk_get_font_funcs (),
jdkFontInfo, (hb_destroy_func_t) _do_nothing);
hb_font_set_scale (font,
- FloatToFixed(jdkFontInfo->ptSize*jdkFontInfo->devScale),
- FloatToFixed(jdkFontInfo->ptSize*jdkFontInfo->devScale));
+ HBFloatToFixed(jdkFontInfo->ptSize*jdkFontInfo->devScale),
+ HBFloatToFixed(jdkFontInfo->ptSize*jdkFontInfo->devScale));
return font;
}
@@ -339,8 +339,8 @@
hb_face_destroy(face);
hb_font_set_scale(font,
- FloatToFixed(jdkFontInfo->ptSize),
- FloatToFixed(jdkFontInfo->ptSize));
+ HBFloatToFixed(jdkFontInfo->ptSize),
+ HBFloatToFixed(jdkFontInfo->ptSize));
return font;
}
#endif
--- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk.h Tue Sep 06 13:03:00 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk.h Tue Sep 06 08:32:50 2016 -0700
@@ -49,8 +49,8 @@
// Use 16.16 for better precision than 26.6
-#define FloatToFixedScale ((float)(1 << 16))
-#define FloatToFixed(f) ((unsigned int)((f) * FloatToFixedScale))
+#define HBFloatToFixedScale ((float)(1 << 16))
+#define HBFloatToFixed(f) ((unsigned int)((f) * HBFloatToFixedScale))
/*
* Note: