Package icyllis.arc3d.granite
Class TextBlobCache
java.lang.Object
icyllis.arc3d.granite.TextBlobCache
TextBlobCache reuses data from previous drawing operations using multiple criteria
to pick the best data for the draw. In addition, it provides a central service for managing
resource usage through a weak reference.
The draw data is stored in a three-tiered system. The first tier is keyed by the TextBlob's
identity. The second tier uses the TextBlobCache.FeatureKey
to get a general match for the
draw. The last tier queries each sub run using canReuse to determine if each sub run can handle
the drawing parameters.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Secondary cache key. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfind
(TextBlob blob, TextBlobCache.FeatureKey key) insert
(TextBlob blob, TextBlobCache.FeatureKey key, BakedTextBlob entry) void
void
remove
(BakedTextBlob entry)
-
Constructor Details
-
TextBlobCache
public TextBlobCache()
-
-
Method Details
-
find
-
insert
@Nonnull public BakedTextBlob insert(@Nonnull TextBlob blob, @Nonnull TextBlobCache.FeatureKey key, @Nonnull BakedTextBlob entry) -
remove
-
purgeStaleEntries
public void purgeStaleEntries()
-