8068619: remove unused internal function in layout
authorsrl
Tue, 24 Nov 2015 13:36:12 -0800
changeset 34785 4c5b27d6a6ac
parent 34784 43a8becc16f3
child 34786 36c3d93671f8
8068619: remove unused internal function in layout Summary: No functional change. Removes unused code. Makes JDK's layout engine have the same signature as ICU HarfBuzz's wrapper. Reviewed: http://mail.openjdk.java.net/pipermail/2d-dev/2015-March/005156.html Reviewed-by: prr
jdk/src/java.desktop/share/native/libfontmanager/FontInstanceAdapter.cpp
jdk/src/java.desktop/share/native/libfontmanager/FontInstanceAdapter.h
jdk/src/java.desktop/share/native/libfontmanager/layout/LEFontInstance.h
--- a/jdk/src/java.desktop/share/native/libfontmanager/FontInstanceAdapter.cpp	Tue Nov 24 15:40:03 2015 +0100
+++ b/jdk/src/java.desktop/share/native/libfontmanager/FontInstanceAdapter.cpp	Tue Nov 24 13:36:12 2015 -0800
@@ -67,12 +67,6 @@
 };
 
 
-const void *FontInstanceAdapter::getFontTable(LETag tableTag) const
-{
-  size_t ignored = 0;
-  return getFontTable(tableTag, ignored);
-}
-
 static const LETag cacheMap[LAYOUTCACHE_ENTRIES] = {
   GPOS_TAG, GDEF_TAG, GSUB_TAG, MORT_TAG, MORX_TAG, KERN_TAG
 };
--- a/jdk/src/java.desktop/share/native/libfontmanager/FontInstanceAdapter.h	Tue Nov 24 15:40:03 2015 +0100
+++ b/jdk/src/java.desktop/share/native/libfontmanager/FontInstanceAdapter.h	Tue Nov 24 13:36:12 2015 -0800
@@ -85,7 +85,6 @@
 
     // tables are cached with the native font scaler data
     // only supports gsub, gpos, gdef, mort tables at present
-    virtual const void *getFontTable(LETag tableTag) const;
     virtual const void *getFontTable(LETag tableTag, size_t &len) const;
 
     virtual void *getKernPairs() const {
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/LEFontInstance.h	Tue Nov 24 15:40:03 2015 +0100
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/LEFontInstance.h	Tue Nov 24 13:36:12 2015 -0800
@@ -181,28 +181,6 @@
      *
      * Subclasses which represent composite fonts should always return <code>NULL</code>.
      *
-     * Note that implementing this function does not allow for range checking.
-     * Subclasses that desire the safety of range checking must implement the
-     * variation which has a length parameter.
-     *
-     * @param tableTag - the four byte table tag. (e.g. 'cmap')
-     *
-     * @return the address of the table in memory, or <code>NULL</code>
-     *         if the table doesn't exist.
-     *
-     * @stable ICU 2.8
-     */
-    virtual const void *getFontTable(LETag tableTag) const = 0;
-
-    /**
-     * This method reads a table from the font. Note that in general,
-     * it only makes sense to call this method on an <code>LEFontInstance</code>
-     * which represents a physical font - i.e. one which has been returned by
-     * <code>getSubFont()</code>. This is because each subfont in a composite font
-     * will have different tables, and there's no way to know which subfont to access.
-     *
-     * Subclasses which represent composite fonts should always return <code>NULL</code>.
-     *
      * This version sets a length, for range checking.
      * Note that range checking can only be accomplished if this function is
      * implemented in subclasses.
@@ -213,7 +191,7 @@
      *         if the table doesn't exist.
      * @internal
      */
-    virtual const void* getFontTable(LETag tableTag, size_t &length) const { length=-1; return getFontTable(tableTag); }  /* -1 = unknown length */
+    virtual const void* getFontTable(LETag tableTag, size_t &length) const = 0;
 
     virtual void *getKernPairs() const = 0;
     virtual void  setKernPairs(void *pairs) const = 0;