Flutter Engine
The Flutter Engine
|
#include <RasterPathAtlas.h>
Public Member Functions | |
RasterPathAtlas (Recorder *recorder) | |
~RasterPathAtlas () override | |
void | recordUploads (DrawContext *) |
void | postFlush () |
Public Member Functions inherited from skgpu::graphite::PathAtlas | |
PathAtlas (Recorder *recorder, uint32_t requestedWidth, uint32_t requestedHeight) | |
virtual | ~PathAtlas () |
std::pair< const Renderer *, std::optional< MaskAndOrigin > > | addShape (const Rect &transformedShapeBounds, const Shape &shape, const Transform &localToDevice, const SkStrokeRec &style) |
virtual bool | isSuitableForAtlasing (const Rect &transformedShapeBounds, const Rect &clipBounds) const |
uint32_t | width () const |
uint32_t | height () const |
Protected Member Functions | |
const TextureProxy * | onAddShape (const Shape &, const Transform &transform, const SkStrokeRec &, skvx::half2 maskSize, skvx::half2 *outPos) override |
virtual const TextureProxy * | onAddShape (const Shape &, const Transform &transform, const SkStrokeRec &, skvx::half2 maskSize, skvx::half2 *outPos)=0 |
Additional Inherited Members | |
Public Types inherited from skgpu::graphite::PathAtlas | |
using | MaskAndOrigin = std::pair< CoverageMaskShape, SkIPoint > |
Static Public Attributes inherited from skgpu::graphite::PathAtlas | |
static constexpr int | kEntryPadding = 1 |
Protected Attributes inherited from skgpu::graphite::PathAtlas | |
Recorder * | fRecorder |
uint32_t | fWidth = 0 |
uint32_t | fHeight = 0 |
PathAtlas class that rasterizes coverage masks on the CPU.
When a new shape gets added, its path is rasterized in preparation for upload. These uploads are recorded by recordUploads()
and subsequently added to an UploadTask.
Shapes are cached for future frames to avoid the cost of raster pipeline rendering. Multiple textures (or Pages) are used to cache masks, so if the atlas is full we can reset a Page and start adding new shapes for a future atlas render.
Definition at line 25 of file RasterPathAtlas.h.
|
explicit |
Definition at line 26 of file RasterPathAtlas.cpp.
|
inlineoverride |
Definition at line 28 of file RasterPathAtlas.h.
|
overrideprotectedvirtual |
Implements skgpu::graphite::PathAtlas.
Definition at line 43 of file RasterPathAtlas.cpp.
|
inline |
Definition at line 31 of file RasterPathAtlas.h.
void skgpu::graphite::RasterPathAtlas::recordUploads | ( | DrawContext * | dc | ) |
Definition at line 37 of file RasterPathAtlas.cpp.