Lets the calling thread abandon provider font loads that are no longer wanted.
More...
#include "donner/svg/resources/FontCatalogTypes.h"
|
| static bool | Requested () |
| | Whether the innermost scope on this thread asks loads to stop.
|
Lets the calling thread abandon provider font loads that are no longer wanted.
Background work, such as rendering a font preview, installs one for its duration so that a foreground render can preempt it even while it is inside a long FontFamilyProvider::loadFamilyData call. Install it only around work whose output is discarded once the scope reports an interruption: an interrupted load resolves to a fallback face that is not cached. An inner scope replaces the outer one until it ends.
◆ ScopedFontLoadInterruption()
| donner::svg::ScopedFontLoadInterruption::ScopedFontLoadInterruption |
( |
std::function< bool()> | interrupted | ) |
|
|
inlineexplicit |
Install interrupted as this thread's interruption check.
- Parameters
-
| interrupted | Returns true once loads on this thread should stop; called only on this thread, while this scope is the innermost one. |
◆ Requested()
| bool donner::svg::ScopedFontLoadInterruption::Requested |
( |
| ) |
|
|
inlinestatic |
Whether the innermost scope on this thread asks loads to stop.
- Returns
- False with no scope.
The documentation for this class was generated from the following file: