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
Nested ClassesModifier and TypeClassDescriptionstatic final class
Secondary cache key. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable BakedTextBlob
find
(@NonNull TextBlob blob, @NonNull TextBlobCache.FeatureKey key) @NonNull BakedTextBlob
insert
(@NonNull TextBlob blob, @NonNull TextBlobCache.FeatureKey key, @NonNull BakedTextBlob entry) void
void
remove
(@NonNull BakedTextBlob entry)
-
Constructor Details
-
TextBlobCache
public TextBlobCache()
-
-
Method Details
-
find
-
insert
public @NonNull BakedTextBlob insert(@NonNull TextBlob blob, @NonNull TextBlobCache.FeatureKey key, @NonNull BakedTextBlob entry) -
remove
-
purgeStaleEntries
public void purgeStaleEntries()
-