jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp
changeset 16891 91e99bed64ae
parent 7486 6a36b1ebc620
child 18256 79d3f8278a38
equal deleted inserted replaced
16890:36b30720a997 16891:91e99bed64ae
    45 
    45 
    46 // FIXME: should look at the format too... maybe have a sub-class for it?
    46 // FIXME: should look at the format too... maybe have a sub-class for it?
    47 le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
    47 le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
    48                                       GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const
    48                                       GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const
    49 {
    49 {
       
    50     const LEReferenceTo<ExtensionSubtable> thisRef(lookupProcessor->getReference(), success); // create a reference to this
       
    51 
    50     if (LE_FAILURE(success)) {
    52     if (LE_FAILURE(success)) {
    51         return 0;
    53         return 0;
    52     }
    54     }
    53 
    55 
    54     le_uint16 elt = SWAPW(extensionLookupType);
    56     le_uint16 elt = SWAPW(extensionLookupType);
    55 
    57 
    56     if (elt != lookupType) {
    58     if (elt != lookupType) {
    57         le_uint32 extOffset = READ_LONG(extensionOffset);
    59         le_uint32 extOffset = READ_LONG(extensionOffset);
    58         LookupSubtable *subtable = (LookupSubtable *) ((char *) this + extOffset);
    60         LEReferenceTo<LookupSubtable> subtable(thisRef, success, extOffset);
    59 
    61 
    60         return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
    62         if(LE_SUCCESS(success)) {
       
    63           return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
       
    64         }
    61     }
    65     }
    62 
    66 
    63     return 0;
    67     return 0;
    64 }
    68 }
    65 
    69