Preallocate room for 2 child processors in FPs

Review URL: https://codereview.chromium.org/1456263003
This commit is contained in:
bsalomon 2015-11-19 08:02:09 -08:00 committed by Commit bot
parent 76f160c61f
commit 418e26f86c

View File

@ -183,7 +183,7 @@ private:
bool hasSameTransforms(const GrFragmentProcessor&) const;
bool fUsesLocalCoords;
bool fUsesLocalCoords;
/**
* fCoordTransforms stores the transforms of this proc, followed by all the transforms of this
@ -208,14 +208,10 @@ private:
*
* The same goes for fTextureAccesses with textures.
*/
SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
int fNumTexturesExclChildren;
int fNumTransformsExclChildren;
// TODO: These must convert their processors to pending-execution refs when the parent is
// converted (do this automatically in GrProgramElement?).
SkTArray<const GrFragmentProcessor*, true> fChildProcessors;
SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
int fNumTexturesExclChildren;
int fNumTransformsExclChildren;
SkSTArray<2, const GrFragmentProcessor*, true> fChildProcessors;
typedef GrProcessor INHERITED;
};