Flutter Engine
The Flutter Engine
|
#include <ComputePathAtlas.h>
Public Member Functions | |
virtual std::unique_ptr< DispatchGroup > | recordDispatches (Recorder *) const =0 |
void | reset () |
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) |
uint32_t | width () const |
uint32_t | height () const |
Static Public Member Functions | |
static std::unique_ptr< ComputePathAtlas > | CreateDefault (Recorder *) |
Protected Member Functions | |
ComputePathAtlas (Recorder *) | |
const TextureProxy * | texture () const |
const TextureProxy * | addRect (skvx::half2 maskSize, SkIPoint16 *outPos) |
bool | isSuitableForAtlasing (const Rect &transformedShapeBounds) const override |
virtual void | onReset ()=0 |
Protected Member Functions inherited from skgpu::graphite::PathAtlas | |
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 > |
Protected Attributes inherited from skgpu::graphite::PathAtlas | |
Recorder * | fRecorder |
uint32_t | fWidth = 0 |
uint32_t | fHeight = 0 |
Static Protected Attributes inherited from skgpu::graphite::PathAtlas | |
static constexpr int | kEntryPadding = 1 |
Base class for PathAtlas implementations that rasterize coverage masks on the GPU using compute shaders.
When a new shape gets added, it gets tracked as input to a series of GPU compute passes. This data is recorded by recordDispatches()
into a DispatchGroup which can be added to a ComputeTask.
After a successful call to recordDispatches()
, the client is free to call reset()
and start adding new shapes for a future atlas render.
Definition at line 36 of file ComputePathAtlas.h.
|
explicitprotected |
Definition at line 32 of file ComputePathAtlas.cpp.
|
protected |
Definition at line 73 of file ComputePathAtlas.cpp.
|
static |
Definition at line 243 of file ComputePathAtlas.cpp.
|
overrideprotectedvirtual |
Returns true if a path coverage mask with the given device-space bounds is sufficiently small to benefit from atlasing without causing too many atlas renders.
Reimplemented from skgpu::graphite::PathAtlas.
Definition at line 49 of file ComputePathAtlas.cpp.
|
protectedpure virtual |
|
pure virtual |
void skgpu::graphite::ComputePathAtlas::reset | ( | ) |
Definition at line 95 of file ComputePathAtlas.cpp.
|
inlineprotected |
Definition at line 52 of file ComputePathAtlas.h.