Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skgpu::ganesh::ClipStack::Draw Class Reference

Public Member Functions

 Draw (const SkRect &drawBounds, GrAA aa)
 
SkClipOp op () const
 
const SkIRectouterBounds () const
 
bool contains (const RawElement &e) const
 
bool contains (const SaveRecord &s) const
 
bool applyDeviceBounds (const SkIRect &deviceBounds)
 
const SkRectbounds () const
 
GrAA aa () const
 

Detailed Description

Definition at line 414 of file ClipStack.cpp.

Constructor & Destructor Documentation

◆ Draw()

skgpu::ganesh::ClipStack::Draw::Draw ( const SkRect drawBounds,
GrAA  aa 
)
inline

Definition at line 416 of file ClipStack.cpp.

417 : fBounds(GrClip::GetPixelIBounds(drawBounds, aa, BoundsType::kExterior))
418 , fAA(aa) {
419 // Be slightly more forgiving on whether or not a draw is inside a clip element.
420 fOriginalBounds = drawBounds.makeInset(GrClip::kBoundsTolerance, GrClip::kBoundsTolerance);
421 if (fOriginalBounds.isEmpty()) {
422 fOriginalBounds = drawBounds;
423 }
424 }
static SkIRect GetPixelIBounds(const SkRect &bounds, GrAA aa, BoundsType mode=BoundsType::kExterior)
Definition GrClip.h:173
static constexpr SkScalar kBoundsTolerance
Definition GrClip.h:110
SkRect makeInset(float dx, float dy) const
Definition SkRect.h:987
bool isEmpty() const
Definition SkRect.h:693

Member Function Documentation

◆ aa()

GrAA skgpu::ganesh::ClipStack::Draw::aa ( ) const
inline

Definition at line 439 of file ClipStack.cpp.

439{ return fAA; }

◆ applyDeviceBounds()

bool skgpu::ganesh::ClipStack::Draw::applyDeviceBounds ( const SkIRect deviceBounds)
inline

Definition at line 434 of file ClipStack.cpp.

434 {
435 return fBounds.intersect(deviceBounds);
436 }
bool intersect(const SkIRect &r)
Definition SkRect.h:513

◆ bounds()

const SkRect & skgpu::ganesh::ClipStack::Draw::bounds ( ) const
inline

Definition at line 438 of file ClipStack.cpp.

438{ return fOriginalBounds; }

◆ contains() [1/2]

bool skgpu::ganesh::ClipStack::Draw::contains ( const RawElement &  e) const
inline

Definition at line 431 of file ClipStack.cpp.

431{ return false; }

◆ contains() [2/2]

bool skgpu::ganesh::ClipStack::Draw::contains ( const SaveRecord &  s) const
inline

Definition at line 432 of file ClipStack.cpp.

432{ return false; }

◆ op()

SkClipOp skgpu::ganesh::ClipStack::Draw::op ( ) const
inline

Definition at line 427 of file ClipStack.cpp.

427{ return SkClipOp::kIntersect; }

◆ outerBounds()

const SkIRect & skgpu::ganesh::ClipStack::Draw::outerBounds ( ) const
inline

Definition at line 428 of file ClipStack.cpp.

428{ return fBounds; }

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