Flutter Engine
The Flutter Engine
|
#include <GrProcessorAnalysis.h>
Public Member Functions | |
GrColorFragmentProcessorAnalysis ()=delete | |
GrColorFragmentProcessorAnalysis (const GrProcessorAnalysisColor &input, std::unique_ptr< GrFragmentProcessor > const fps[], int count) | |
bool | isOpaque () const |
bool | allProcessorsCompatibleWithCoverageAsAlpha () const |
bool | usesLocalCoords () const |
bool | willReadDstColor () const |
bool | requiresDstTexture (const GrCaps &caps) const |
int | initialProcessorsToEliminate (SkPMColor4f *newPipelineInputColor) const |
GrProcessorAnalysisColor | outputColor () const |
GrColorFragmentProcessorAnalysis gathers invariant data from a set of color fragment processors. It is used to recognize optimizations that can simplify the generated shader or make blending more effecient.
Definition at line 96 of file GrProcessorAnalysis.h.
|
delete |
GrColorFragmentProcessorAnalysis::GrColorFragmentProcessorAnalysis | ( | const GrProcessorAnalysisColor & | input, |
std::unique_ptr< GrFragmentProcessor > const | fps[], | ||
int | count | ||
) |
Definition at line 13 of file GrProcessorAnalysis.cpp.
|
inline |
Are all the fragment processors compatible with conflating coverage with color prior to the the first fragment processor. This result assumes that processors that should be eliminated as indicated by initialProcessorsToEliminate() are in fact eliminated.
Definition at line 111 of file GrProcessorAnalysis.h.
|
inline |
If we detected that the result after the first N processors is a known color then we eliminate those N processors and replace the GrDrawOp's color input to the GrPipeline with the known output of the Nth processor, so that the Nth+1 fragment processor (or the XP if there are only N processors) sees its expected input. If this returns 0 then there are no processors to eliminate.
Definition at line 139 of file GrProcessorAnalysis.h.
|
inline |
Definition at line 104 of file GrProcessorAnalysis.h.
|
inline |
Provides known information about the last processor's output color.
Definition at line 149 of file GrProcessorAnalysis.h.
bool GrColorFragmentProcessorAnalysis::requiresDstTexture | ( | const GrCaps & | caps | ) | const |
Will we require a destination-surface texture?
Definition at line 52 of file GrProcessorAnalysis.cpp.
|
inline |
Do any of the fragment processors require local coords. This result assumes that processors that should be eliminated as indicated by initialProcessorsToEliminate() are in fact eliminated.
Definition at line 120 of file GrProcessorAnalysis.h.
|
inline |
Do any of the fragment processors read back the destination color?
Definition at line 125 of file GrProcessorAnalysis.h.