Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
GrFragmentProcessor::ProgramImpl::EmitArgs Struct Reference

#include <GrFragmentProcessor.h>

Public Member Functions

 EmitArgs (GrGLSLFPFragmentBuilder *fragBuilder, GrGLSLUniformHandler *uniformHandler, const GrShaderCaps *caps, const GrFragmentProcessor &fp, const char *inputColor, const char *destColor, const char *sampleCoord)
 

Public Attributes

GrGLSLFPFragmentBuilderfFragBuilder
 
GrGLSLUniformHandlerfUniformHandler
 
const GrShaderCapsfShaderCaps
 
const GrFragmentProcessorfFp
 
const char * fInputColor
 
const char * fDestColor
 
const char * fSampleCoord
 

Detailed Description

Called when the program stage should insert its code into the shaders. The code in each shader will be in its own block ({}) and so locally scoped names will not collide across stages.

Parameters
fragBuilderInterface used to emit code in the shaders.
uniformHandlerInterface used for accessing information about our uniforms
capsThe capabilities of the GPU which will render this FP
fpThe processor that generated this program stage.
inputColorA half4 that holds the input color to the stage in the FS (or the source color, for blend processors). nullptr inputs are converted to "half4(1.0)" (solid white) during construction. TODO: Better system for communicating optimization info (e.g. input color is solid white, trans black, known to be opaque, etc.) that allows the processor to communicate back similar known info about its output.
destColorA half4 that holds the dest color to the stage. Only meaningful when the "is blend processor" FP flag is set.
sampleCoordThe name of a local coord reference to a float2 variable. Only meaningful when the "references sample coords" FP flag is set.

Definition at line 501 of file GrFragmentProcessor.h.

Constructor & Destructor Documentation

◆ EmitArgs()

GrFragmentProcessor::ProgramImpl::EmitArgs::EmitArgs ( GrGLSLFPFragmentBuilder fragBuilder,
GrGLSLUniformHandler uniformHandler,
const GrShaderCaps caps,
const GrFragmentProcessor fp,
const char *  inputColor,
const char *  destColor,
const char *  sampleCoord 
)
inline

Definition at line 502 of file GrFragmentProcessor.h.

509 : fFragBuilder(fragBuilder)
510 , fUniformHandler(uniformHandler)
511 , fShaderCaps(caps)
512 , fFp(fp)
513 , fInputColor(inputColor ? inputColor : "half4(1.0)")
514 , fDestColor(destColor)
515 , fSampleCoord(sampleCoord) {}
const uint32_t fp

Member Data Documentation

◆ fDestColor

const char* GrFragmentProcessor::ProgramImpl::EmitArgs::fDestColor

Definition at line 521 of file GrFragmentProcessor.h.

◆ fFp

const GrFragmentProcessor& GrFragmentProcessor::ProgramImpl::EmitArgs::fFp

Definition at line 519 of file GrFragmentProcessor.h.

◆ fFragBuilder

GrGLSLFPFragmentBuilder* GrFragmentProcessor::ProgramImpl::EmitArgs::fFragBuilder

Definition at line 516 of file GrFragmentProcessor.h.

◆ fInputColor

const char* GrFragmentProcessor::ProgramImpl::EmitArgs::fInputColor

Definition at line 520 of file GrFragmentProcessor.h.

◆ fSampleCoord

const char* GrFragmentProcessor::ProgramImpl::EmitArgs::fSampleCoord

Definition at line 522 of file GrFragmentProcessor.h.

◆ fShaderCaps

const GrShaderCaps* GrFragmentProcessor::ProgramImpl::EmitArgs::fShaderCaps

Definition at line 518 of file GrFragmentProcessor.h.

◆ fUniformHandler

GrGLSLUniformHandler* GrFragmentProcessor::ProgramImpl::EmitArgs::fUniformHandler

Definition at line 517 of file GrFragmentProcessor.h.


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