|
FastUIDraw
|
A GlyphAtlas is a common location to place glyph data of an application. Ideally, all glyph data is placed into a single GlyphAtlas. Methods of GlyphAtlas are thread safe, protected behind atomics and a mutex within the GlyphAtlas. More...
#include <glyph_atlas.hpp>

Public Member Functions | |
| GlyphAtlas (reference_counted_ptr< GlyphAtlasBackingStoreBase > pstore) | |
| int | allocate_data (c_array< const uint32_t > pdata) |
| void | clear (void) |
| unsigned int | data_allocated (void) |
| void | deallocate_data (int location, int count) |
| void | flush (void) const |
| void | lock_resources (void) |
| unsigned int | number_times_cleared (void) const |
| const reference_counted_ptr< const GlyphAtlasBackingStoreBase > & | store (void) const |
| void | unlock_resources (void) |
Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter > | |
| reference_counted_base (void) | |
Additional Inherited Members | |
Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter > | |
| static void | add_reference (const reference_counted_base< T, Counter > *p) |
| static void | remove_reference (const reference_counted_base< T, Counter > *p) |
A GlyphAtlas is a common location to place glyph data of an application. Ideally, all glyph data is placed into a single GlyphAtlas. Methods of GlyphAtlas are thread safe, protected behind atomics and a mutex within the GlyphAtlas.
Definition at line 111 of file glyph_atlas.hpp.
|
explicit |
Ctor.
| pstore | GlyphAtlasBackingStoreBase to which to store data |
| int fastuidraw::GlyphAtlas::allocate_data | ( | c_array< const uint32_t > | pdata | ) |
Negative return value indicates failure.
| void fastuidraw::GlyphAtlas::clear | ( | void | ) |
Frees all allocated regions of this GlyphAtlas;
| unsigned int fastuidraw::GlyphAtlas::data_allocated | ( | void | ) |
Returns how much data has been allocated
| void fastuidraw::GlyphAtlas::deallocate_data | ( | int | location, |
| int | count | ||
| ) |
Deallocate data
| void fastuidraw::GlyphAtlas::flush | ( | void | ) | const |
Calls GlyphAtlasBackingStoreBase::flush() on the backing store (see store()).
| void fastuidraw::GlyphAtlas::lock_resources | ( | void | ) |
Increments an internal counter. If this internal counter is greater than zero, then clear() and deallocate_data() are -delayed- until the counter reaches zero again (see unlock_resources()). The use case is for buffered painting where the GPU calls are delayed for later (to batch commands) and a clear() or deallocate_data() was issued during painting.
| unsigned int fastuidraw::GlyphAtlas::number_times_cleared | ( | void | ) | const |
Returns the number of times that clear() has been called.
| const reference_counted_ptr<const GlyphAtlasBackingStoreBase>& fastuidraw::GlyphAtlas::store | ( | void | ) | const |
Returns the store for this GlyphAtlas.
| void fastuidraw::GlyphAtlas::unlock_resources | ( | void | ) |
Decrements an internal counter. If this internal counter reaches zero then any deallocate_data() and clear() calls are issued.
1.8.13