[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Writing a GlyphCache with pure Java
From:       linuxhippy () gmail ! com (Clemens Eisserer)
Date:       2008-12-16 23:30:23
Message-ID: 194f62550812161530v30595b36vaf9e3b77139f1472 () mail ! gmail ! com
[Download RAW message or body]

Hello,

1.) I was trying to write a GlyphCache without native code, however I
was struggling with some problems:
- How to identify wether a glyph has already been cached or not
(cellInfo->cacheID)
- How to get notified that a glyph I cached is no longer valid, and
its data structure has been freed (cellInfo->glyphInfo = NULL)
Is it really not possible at all, or did I just miss something?

If its not possible, any ideas how this could be implemented?
I thought about one large Unsafe holding all the CacheCellInfo's,
however that ends up with very dirty unsafe code and would mean a lot
of memory-overhead - are there better ways to do this?

2.) Can GlyphList.fillBounds handle subPixPos?

3.) Would it make sence to replace the copy-loop in
GlyphList.getGrayBits with Unsafe.copyMemory?
I also found copy-loops + JNI-code in sun.java2d.pipe.RenderBuffer,
using copyMemory could speed up small copies and remove some
duplicated native code.

Thanks, Clemens


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic