Flutter Impeller
impeller::Contents::ClipCoverage Struct Reference

#include <contents.h>

Public Types

enum  Type {
  Type::kNoChange,
  Type::kAppend,
  Type::kRestore
}
 

Public Attributes

Type type = Type::kNoChange
 
bool is_difference_or_non_square = false
 
std::optional< Rectcoverage = std::nullopt
 This coverage is the outer coverage of the clip. More...
 

Detailed Description

Definition at line 37 of file contents.h.

Member Enumeration Documentation

◆ Type

Enumerator
kNoChange 
kAppend 
kRestore 

Definition at line 38 of file contents.h.

38 { kNoChange, kAppend, kRestore };

Member Data Documentation

◆ coverage

std::optional<Rect> impeller::Contents::ClipCoverage::coverage = std::nullopt

This coverage is the outer coverage of the clip.

For example, if the clip is a circular clip, this is the rectangle that contains the circle and not the rectangle that is contained within the circle. This means that we cannot use the coverage alone to determine if a clip can be culled, and instead also use the somewhat hacky "is_difference_or_non_square" field.

Definition at line 52 of file contents.h.

Referenced by impeller::EntityPassClipStack::ApplyClipState(), and impeller::Canvas::Restore().

◆ is_difference_or_non_square

bool impeller::Contents::ClipCoverage::is_difference_or_non_square = false

Definition at line 43 of file contents.h.

Referenced by impeller::EntityPassClipStack::ApplyClipState().

◆ type


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