sunFont.c revision 5980
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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 "stdlib.h"
#include "string.h"
#include "gdefs.h"
#include "jlong.h"
#include "sunfontids.h"
#include "fontscalerdefs.h"
#include "sun_font_FontManager.h"
#include "sun_font_NullFontScaler.h"
#include "sun_font_StrikeCache.h"
static void *theNullScalerContext = NULL;
if (theNullScalerContext == NULL) {
}
return ptr_to_jlong(theNullScalerContext);
}
int isNullScalerContext(void *context) {
return theNullScalerContext == context;
}
/* Eventually we may rework it to be a singleton.
* This will require additional checks in freeLongMemory/freeIntMemory
* and on other hand malformed fonts (main source of null glyph images)
* are supposed to be collected fast.
* But perhaps it is still right thing to do.
* Even better is to eliminate the need to have this native method
* but for this it is necessary to rework Strike and drawing logic
* to be able to live with NULL pointers without performance hit.
*/
return ptr_to_jlong(nullscaler);
}
void initLCDGammaTables();
/* placeholder for extern variable */
"(Ljava/nio/ByteBuffer;II)I");
"readFile", "(Ljava/nio/ByteBuffer;)V");
"<init>", "(FFFFFFFFFF)V");
"<init>", "(FFFF)V");
"()Lsun/font/CharToGlyphMapper;");
}
return sunFontIDs;
}
/*
* Class: sun_font_StrikeCache
* Method: freeIntPointer
* Signature: (I)V
*/
/* Note this is used for freeing a glyph which was allocated
* but never placed into the glyph cache. The caller holds the
* only reference, therefore it is unnecessary to invalidate any
* accelerated glyph cache cells as we do in freeInt/LongMemory().
*/
if (ptr != 0) {
}
}
/*
* Class: sun_font_StrikeCache
* Method: freeLongPointer
* Signature: (J)V
*/
/* Note this is used for freeing a glyph which was allocated
* but never placed into the glyph cache. The caller holds the
* only reference, therefore it is unnecessary to invalidate any
* accelerated glyph cache cells as we do in freeInt/LongMemory().
*/
if (ptr != 0L) {
}
}
/*
* Class: sun_font_StrikeCache
* Method: freeIntMemory
* Signature: ([I)V
*/
int i;
if (ptrs) {
for (i=0; i< len; i++) {
if (ptrs[i] != 0) {
// invalidate this glyph's accelerated cache cell
}
}
}
}
}
}
/*
* Class: sun_font_StrikeCache
* Method: freeLongMemory
* Signature: ([J)V
*/
int i;
if (ptrs) {
for (i=0; i< len; i++) {
if (ptrs[i] != 0L) {
}
}
}
}
}
}
return;
}
return;
}
return;
}
nresults[0] = sizeof(void*);
nresults[2] = 0;
}
if (ltc) {
int i;
for(i=0;i<LAYOUTCACHE_ENTRIES;i++) {
}
}
return ltc;
}
if (ltc) {
int i;
for(i=0;i<LAYOUTCACHE_ENTRIES;i++) {
}
}
}