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

#include <AAConvexPathRenderer.h>

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

Public Member Functions

 AAConvexPathRenderer ()=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 AAConvexPathRenderer.h.

Constructor & Destructor Documentation

◆ AAConvexPathRenderer()

skgpu::ganesh::AAConvexPathRenderer::AAConvexPathRenderer ( )
default

Member Function Documentation

◆ name()

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

Implements skgpu::ganesh::PathRenderer.

Definition at line 19 of file AAConvexPathRenderer.h.

19{ return "AAConvex"; }

◆ onCanDrawPath()

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

Subclass implementation of canDrawPath()

Implements skgpu::ganesh::PathRenderer.

Definition at line 909 of file AAConvexPathRenderer.cpp.

909 {
910 // This check requires convexity and known direction, since the direction is used to build
911 // the geometry segments. Degenerate convex paths will fall through to some other path renderer.
912 if (args.fCaps->shaderCaps()->fShaderDerivativeSupport &&
913 (GrAAType::kCoverage == args.fAAType) && args.fShape->style().isSimpleFill() &&
914 !args.fShape->inverseFilled() && args.fShape->knownToBeConvex() &&
915 args.fShape->knownDirection()) {
916 return CanDrawPath::kYes;
917 }
918 return CanDrawPath::kNo;
919}
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ onDrawPath()

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

Subclass implementation of drawPath()

Implements skgpu::ganesh::PathRenderer.

Definition at line 921 of file AAConvexPathRenderer.cpp.

921 {
922 GR_AUDIT_TRAIL_AUTO_FRAME(args.fContext->priv().auditTrail(),
923 "AAConvexPathRenderer::onDrawPath");
924 SkASSERT(args.fSurfaceDrawContext->numSamples() <= 1);
925 SkASSERT(!args.fShape->isEmpty());
926
927 SkPath path;
928 args.fShape->asPath(&path);
929
930 GrOp::Owner op = AAConvexPathOp::Make(args.fContext, std::move(args.fPaint),
931 *args.fViewMatrix,
932 path, args.fUserStencilSettings);
933 args.fSurfaceDrawContext->addDrawOp(args.fClip, std::move(op));
934 return true;
935}
#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: