Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
skgpu::ganesh::AAHairLinePathRenderer Class Referencefinal

#include <AAHairLinePathRenderer.h>

Inheritance diagram for skgpu::ganesh::AAHairLinePathRenderer:
skgpu::ganesh::PathRenderer SkRefCnt SkRefCntBase

Public Member Functions

 AAHairLinePathRenderer ()=default
 
const char * name () const override
 
- Public Member Functions inherited from skgpu::ganesh::PathRenderer
 PathRenderer ()=default
 
StencilSupport getStencilSupport (const GrStyledShape &shape) const
 
CanDrawPath canDrawPath (const CanDrawPathArgs &args) const
 
bool drawPath (const DrawPathArgs &args)
 
void stencilPath (const StencilPathArgs &args)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Private Member Functions

CanDrawPath onCanDrawPath (const CanDrawPathArgs &) const override
 
bool onDrawPath (const DrawPathArgs &) override
 

Additional Inherited Members

- Public Types inherited from skgpu::ganesh::PathRenderer
enum  StencilSupport { kNoSupport_StencilSupport , kStencilOnly_StencilSupport , kNoRestriction_StencilSupport }
 
enum class  CanDrawPath { kNo , kAsBackup , kYes }
 
- Static Protected Member Functions inherited from skgpu::ganesh::PathRenderer
static void GetPathDevBounds (const SkPath &path, SkISize devSize, const SkMatrix &matrix, SkRect *bounds)
 

Detailed Description

Definition at line 15 of file AAHairLinePathRenderer.h.

Constructor & Destructor Documentation

◆ AAHairLinePathRenderer()

skgpu::ganesh::AAHairLinePathRenderer::AAHairLinePathRenderer ( )
default

Member Function Documentation

◆ name()

const char * skgpu::ganesh::AAHairLinePathRenderer::name ( ) const
inlineoverridevirtual

Implements skgpu::ganesh::PathRenderer.

Definition at line 19 of file AAHairLinePathRenderer.h.

19{ return "AAHairline"; }

◆ onCanDrawPath()

PathRenderer::CanDrawPath skgpu::ganesh::AAHairLinePathRenderer::onCanDrawPath ( const CanDrawPathArgs args) const
overrideprivatevirtual

Subclass implementation of canDrawPath()

Implements skgpu::ganesh::PathRenderer.

Definition at line 1314 of file AAHairLinePathRenderer.cpp.

1314 {
1315 if (GrAAType::kCoverage != args.fAAType) {
1316 return CanDrawPath::kNo;
1317 }
1318
1319 if (!GrIsStrokeHairlineOrEquivalent(args.fShape->style(), *args.fViewMatrix, nullptr)) {
1320 return CanDrawPath::kNo;
1321 }
1322
1323 // We don't currently handle dashing in this class though perhaps we should.
1324 if (args.fShape->style().pathEffect()) {
1325 return CanDrawPath::kNo;
1326 }
1327
1328 if (SkPath::kLine_SegmentMask == args.fShape->segmentMask() ||
1329 args.fCaps->shaderCaps()->fShaderDerivativeSupport) {
1330 return CanDrawPath::kYes;
1331 }
1332
1333 return CanDrawPath::kNo;
1334}
bool GrIsStrokeHairlineOrEquivalent(const GrStyle &style, const SkMatrix &matrix, SkScalar *outCoverage)
Definition GrUtil.cpp:65
@ kLine_SegmentMask
Definition SkPath.h:1437
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ onDrawPath()

bool skgpu::ganesh::AAHairLinePathRenderer::onDrawPath ( const DrawPathArgs args)
overrideprivatevirtual

Subclass implementation of drawPath()

Implements skgpu::ganesh::PathRenderer.

Definition at line 1337 of file AAHairLinePathRenderer.cpp.

1337 {
1338 GR_AUDIT_TRAIL_AUTO_FRAME(args.fContext->priv().auditTrail(),
1339 "AAHairlinePathRenderer::onDrawPath");
1340 SkASSERT(args.fSurfaceDrawContext->numSamples() <= 1);
1341
1342 SkPath path;
1343 args.fShape->asPath(&path);
1344 GrOp::Owner op =
1345 AAHairlineOp::Make(args.fContext, std::move(args.fPaint), *args.fViewMatrix, path,
1346 args.fShape->style(), *args.fClipConservativeBounds,
1347 args.fUserStencilSettings);
1348 args.fSurfaceDrawContext->addDrawOp(args.fClip, std::move(op));
1349 return true;
1350}
#define GR_AUDIT_TRAIL_AUTO_FRAME(audit_trail, framename)
#define SkASSERT(cond)
Definition SkAssert.h:116
std::unique_ptr< GrOp > Owner
Definition GrOp.h:72
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57

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