Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkSL::RP::AutoContinueMask Class Reference

Public Member Functions

 AutoContinueMask (Generator *gen)
 
 ~AutoContinueMask ()
 
void enable ()
 
void enter ()
 
void exit ()
 
void enterLoopBody ()
 
void exitLoopBody ()
 
int stackID ()
 

Detailed Description

Definition at line 595 of file SkSLRasterPipelineCodeGenerator.cpp.

Constructor & Destructor Documentation

◆ AutoContinueMask()

SkSL::RP::AutoContinueMask::AutoContinueMask ( Generator gen)
inline

Definition at line 597 of file SkSLRasterPipelineCodeGenerator.cpp.

597: fGenerator(gen) {}
Definition: gen.py:1

◆ ~AutoContinueMask()

SkSL::RP::AutoContinueMask::~AutoContinueMask ( )
inline

Definition at line 599 of file SkSLRasterPipelineCodeGenerator.cpp.

599 {
600 if (fPreviousContinueMask) {
601 fGenerator->fCurrentContinueMask = fPreviousContinueMask;
602 }
603 }

Member Function Documentation

◆ enable()

void SkSL::RP::AutoContinueMask::enable ( )
inline

Definition at line 605 of file SkSLRasterPipelineCodeGenerator.cpp.

605 {
606 SkASSERT(!fContinueMaskStack.has_value());
607
608 fContinueMaskStack.emplace(fGenerator);
609 fPreviousContinueMask = fGenerator->fCurrentContinueMask;
610 fGenerator->fCurrentContinueMask = this;
611 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ enter()

void SkSL::RP::AutoContinueMask::enter ( )
inline

Definition at line 613 of file SkSLRasterPipelineCodeGenerator.cpp.

613 {
614 SkASSERT(fContinueMaskStack.has_value());
615 fContinueMaskStack->enter();
616 }

◆ enterLoopBody()

void SkSL::RP::AutoContinueMask::enterLoopBody ( )
inline

Definition at line 623 of file SkSLRasterPipelineCodeGenerator.cpp.

623 {
624 if (fContinueMaskStack.has_value()) {
625 fContinueMaskStack->enter();
626 fGenerator->builder()->push_constant_i(0);
627 fContinueMaskStack->exit();
628 }
629 }
void push_constant_i(int32_t val, int count=1)

◆ exit()

void SkSL::RP::AutoContinueMask::exit ( )
inline

Definition at line 618 of file SkSLRasterPipelineCodeGenerator.cpp.

618 {
619 SkASSERT(fContinueMaskStack.has_value());
620 fContinueMaskStack->exit();
621 }

◆ exitLoopBody()

void SkSL::RP::AutoContinueMask::exitLoopBody ( )
inline

Definition at line 631 of file SkSLRasterPipelineCodeGenerator.cpp.

631 {
632 if (fContinueMaskStack.has_value()) {
633 fContinueMaskStack->enter();
634 fGenerator->builder()->pop_and_reenable_loop_mask();
635 fContinueMaskStack->exit();
636 }
637 }

◆ stackID()

int SkSL::RP::AutoContinueMask::stackID ( )
inline

Definition at line 639 of file SkSLRasterPipelineCodeGenerator.cpp.

639 {
640 SkASSERT(fContinueMaskStack.has_value());
641 return fContinueMaskStack->stackID();
642 }

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