Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
skgpu::graphite::VelloScene Class Referencefinal

#include <VelloRenderer.h>

Public Member Functions

 VelloScene ()
 
void reset ()
 
void solidFill (const SkPath &, const SkColor4f &, const SkPathFillType, const Transform &transform)
 
void solidStroke (const SkPath &, const SkColor4f &, const SkStrokeRec &, const Transform &transform)
 
void pushClipLayer (const SkPath &shape, const Transform &transform)
 
void popClipLayer ()
 

Friends

class VelloRenderer
 

Detailed Description

Definition at line 33 of file VelloRenderer.h.

Constructor & Destructor Documentation

◆ VelloScene()

skgpu::graphite::VelloScene::VelloScene ( )

Definition at line 204 of file VelloRenderer.cpp.

204: fEncoding(vello_cpp::new_encoding()) {}

Member Function Documentation

◆ popClipLayer()

void skgpu::graphite::VelloScene::popClipLayer ( )

Definition at line 238 of file VelloRenderer.cpp.

238 {
239 SkASSERT(fLayers > 0);
240 fEncoding->end_clip();
241 SkDEBUGCODE(fLayers--;)
242}
#define SkASSERT(cond)
Definition SkAssert.h:116
#define SkDEBUGCODE(...)
Definition SkDebug.h:23

◆ pushClipLayer()

void skgpu::graphite::VelloScene::pushClipLayer ( const SkPath shape,
const Transform transform 
)

Definition at line 232 of file VelloRenderer.cpp.

232 {
233 PathIter iter(shape, t);
234 fEncoding->begin_clip(to_vello_affine(t), iter);
235 SkDEBUGCODE(fLayers++;)
236}

◆ reset()

void skgpu::graphite::VelloScene::reset ( )

Definition at line 206 of file VelloRenderer.cpp.

206 {
207 fEncoding->reset();
208}

◆ solidFill()

void skgpu::graphite::VelloScene::solidFill ( const SkPath shape,
const SkColor4f fillColor,
const SkPathFillType  fillType,
const Transform transform 
)

Definition at line 210 of file VelloRenderer.cpp.

213 {
214 PathIter iter(shape, t);
215 fEncoding->fill(to_fill_type(fillType),
216 to_vello_affine(t),
217 {vello_cpp::BrushKind::Solid, {to_vello_color(fillColor)}},
218 iter);
219}

◆ solidStroke()

void skgpu::graphite::VelloScene::solidStroke ( const SkPath shape,
const SkColor4f fillColor,
const SkStrokeRec style,
const Transform transform 
)

Definition at line 221 of file VelloRenderer.cpp.

224 {
225 // TODO: Obtain dashing pattern here and let Vello handle dashing on the CPU while
226 // encoding the path?
227 PathIter iter(shape, t);
228 vello_cpp::Brush brush{vello_cpp::BrushKind::Solid, {to_vello_color(fillColor)}};
229 fEncoding->stroke(to_stroke(style), to_vello_affine(t), brush, iter);
230}

Friends And Related Symbol Documentation

◆ VelloRenderer

friend class VelloRenderer
friend

Definition at line 53 of file VelloRenderer.h.


The documentation for this class was generated from the following files: