Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkSL::RP::ImmutableLValue Class Referencefinal
Inheritance diagram for SkSL::RP::ImmutableLValue:
SkSL::RP::LValue

Public Member Functions

 ImmutableLValue (const Variable *v)
 
bool isWritable () const override
 
SlotRange fixedSlotRange (Generator *gen) override
 
AutoStackdynamicSlotRange () override
 
bool push (Generator *gen, SlotRange fixedOffset, AutoStack *dynamicOffset, SkSpan< const int8_t > swizzle) override
 
bool store (Generator *gen, SlotRange fixedOffset, AutoStack *dynamicOffset, SkSpan< const int8_t > swizzle) override
 
- Public Member Functions inherited from SkSL::RP::LValue
virtual ~LValue ()=default
 
virtual bool isWritable () const =0
 
virtual SlotRange fixedSlotRange (Generator *gen)=0
 
virtual AutoStackdynamicSlotRange ()=0
 
virtual SkSpan< const int8_t > swizzle ()
 
virtual bool push (Generator *gen, SlotRange fixedOffset, AutoStack *dynamicOffset, SkSpan< const int8_t > swizzle)=0
 
virtual bool store (Generator *gen, SlotRange fixedOffset, AutoStack *dynamicOffset, SkSpan< const int8_t > swizzle)=0
 

Additional Inherited Members

- Public Attributes inherited from SkSL::RP::LValue
std::unique_ptr< ExpressionfScratchExpression
 

Detailed Description

Definition at line 862 of file SkSLRasterPipelineCodeGenerator.cpp.

Constructor & Destructor Documentation

◆ ImmutableLValue()

SkSL::RP::ImmutableLValue::ImmutableLValue ( const Variable v)
inlineexplicit

Definition at line 864 of file SkSLRasterPipelineCodeGenerator.cpp.

864: fVariable(v) {}

Member Function Documentation

◆ dynamicSlotRange()

AutoStack * SkSL::RP::ImmutableLValue::dynamicSlotRange ( )
inlineoverridevirtual

Returns a stack which holds a single integer, representing the dynamic offset of the lvalue. This value does not incorporate the fixed offset. If null is returned, the lvalue doesn't have a dynamic offset. evaluateDynamicIndices must be called before this is used.

Implements SkSL::RP::LValue.

Definition at line 874 of file SkSLRasterPipelineCodeGenerator.cpp.

874 {
875 return nullptr;
876 }

◆ fixedSlotRange()

SlotRange SkSL::RP::ImmutableLValue::fixedSlotRange ( Generator gen)
inlineoverridevirtual

Returns the fixed slot range of the lvalue, after it is winnowed down to the selected field/index. The range is calculated assuming every dynamic index will evaluate to zero.

Implements SkSL::RP::LValue.

Definition at line 870 of file SkSLRasterPipelineCodeGenerator.cpp.

870 {
871 return gen->getImmutableSlots(*fVariable);
872 }
Definition: gen.py:1

◆ isWritable()

bool SkSL::RP::ImmutableLValue::isWritable ( ) const
inlineoverridevirtual

Returns true if this lvalue is actually writable–temporaries and uniforms are not.

Implements SkSL::RP::LValue.

Definition at line 866 of file SkSLRasterPipelineCodeGenerator.cpp.

866 {
867 return false;
868 }

◆ push()

bool SkSL::RP::ImmutableLValue::push ( Generator gen,
SlotRange  fixedOffset,
AutoStack dynamicOffset,
SkSpan< const int8_t >  swizzle 
)
inlineoverridevirtual

Pushes values directly onto the stack.

Implements SkSL::RP::LValue.

Definition at line 878 of file SkSLRasterPipelineCodeGenerator.cpp.

881 {
882 if (dynamicOffset) {
883 gen->builder()->push_immutable_indirect(fixedOffset, dynamicOffset->stackID(),
884 this->fixedSlotRange(gen));
885 } else {
886 gen->builder()->push_immutable(fixedOffset);
887 }
888 if (!swizzle.empty()) {
889 gen->builder()->swizzle(fixedOffset.count, swizzle);
890 }
891 return true;
892 }
virtual SkSpan< const int8_t > swizzle()

◆ store()

bool SkSL::RP::ImmutableLValue::store ( Generator gen,
SlotRange  fixedOffset,
AutoStack dynamicOffset,
SkSpan< const int8_t >  swizzle 
)
inlineoverridevirtual

Stores topmost values from the stack directly into the lvalue.

Implements SkSL::RP::LValue.

Definition at line 894 of file SkSLRasterPipelineCodeGenerator.cpp.

897 {
898 SkDEBUGFAIL("immutable values cannot be stored into");
899 return unsupported();
900 }
#define SkDEBUGFAIL(message)
Definition: SkAssert.h:118

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