Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GrXPFactory Class Referenceabstract

We install a GrXPFactory (XPF) early on in the pipeline before all the final draw information is known (e.g. More...

#include <GrXferProcessor.h>

Inheritance diagram for GrXPFactory:
SkRefCnt SkRefCntBase

Classes

struct  InvariantBlendedColor
 Known color information after blending, but before accounting for any coverage. More...
 

Public Types

typedef GrXferProcessor::DstTexture DstTexture
 

Public Member Functions

GrXferProcessorcreateXferProcessor (const GrPipelineOptimizations &optimizations, bool hasMixedSamples, const DstTexture *, const GrCaps &caps) const
 
virtual void getInvariantBlendedColor (const GrProcOptInfo &colorPOI, InvariantBlendedColor *) const =0
 Returns information about the output color, produced by XPs from this factory, that will be known after blending. More...
 
bool willNeedDstTexture (const GrCaps &caps, const GrPipelineOptimizations &optimizations) const
 
bool isEqual (const GrXPFactory &that) const
 
template<typename T >
const T & cast () const
 Helper for down-casting to a GrXPFactory subclass.
 
uint32_t classID () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 Default construct, initializing the reference count to 1.
 
virtual ~SkRefCntBase ()
 Destruct, asserting that the reference count is 1.
 
int32_t getRefCnt () const
 Return the reference count. More...
 
void validate () const
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 

Protected Member Functions

template<typename XPF_SUBCLASS >
void initClassID ()
 
- Protected Member Functions inherited from SkRefCntBase
void internal_dispose_restore_refcnt_to_1 () const
 Allow subclasses to call this if they've overridden internal_dispose so they can reset fRefCnt before the destructor is called or if they choose not to call the destructor (e.g. More...
 

Protected Attributes

uint32_t fClassID
 

Private Types

enum  { kIllegalXPFClassID = 0 }
 
typedef GrProgramElement INHERITED
 

Private Member Functions

virtual GrXferProcessoronCreateXferProcessor (const GrCaps &caps, const GrPipelineOptimizations &optimizations, bool hasMixedSamples, const DstTexture *) const =0
 
virtual bool onIsEqual (const GrXPFactory &) const =0
 
bool willReadDstColor (const GrCaps &, const GrPipelineOptimizations &) const
 
virtual bool onWillReadDstColor (const GrCaps &, const GrPipelineOptimizations &) const =0
 Returns true if the XP generated by this factory will explicitly read dst in the fragment shader.
 

Static Private Member Functions

static uint32_t GenClassID ()
 

Static Private Attributes

static int32_t gCurrXPFClassID
 

Detailed Description

We install a GrXPFactory (XPF) early on in the pipeline before all the final draw information is known (e.g.

whether there is fractional pixel coverage, will coverage be 1 or 4 channel, is the draw opaque, etc.). Once the state of the draw is finalized, we use the XPF along with all the draw information to create a GrXferProcessor (XP) which can implement the desired blending for the draw.

Before the XP is created, the XPF is able to answer queries about what functionality the XPs it creates will have. For example, can it create an XP that supports RGB coverage or will the XP blend with the destination color.

Member Function Documentation

virtual void GrXPFactory::getInvariantBlendedColor ( const GrProcOptInfo &  colorPOI,
InvariantBlendedColor  
) const
pure virtual

Returns information about the output color, produced by XPs from this factory, that will be known after blending.

Note that we can conflate coverage and color, so the actual values written to pixels with partial coverage may not always seem consistent with the invariant information returned by this function.


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