*/
struct Run {
Run()
- : fColor(GrColor_ILLEGAL)
- , fInitialized(false)
+ : fInitialized(false)
, fDrawAsPaths(false) {
fVertexBounds.setLargestInverted();
// To ensure we always have one subrun, we push back a fresh run here
, fVertexEndIndex(0)
, fGlyphStartIndex(0)
, fGlyphEndIndex(0)
+ , fColor(GrColor_ILLEGAL)
, fMaskFormat(kA8_GrMaskFormat)
, fDrawAsDistanceFields(false)
, fUseLCDText(false) {}
, fVertexEndIndex(that.fVertexEndIndex)
, fGlyphStartIndex(that.fGlyphStartIndex)
, fGlyphEndIndex(that.fGlyphEndIndex)
+ , fColor(that.fColor)
, fMaskFormat(that.fMaskFormat)
, fDrawAsDistanceFields(that.fDrawAsDistanceFields)
, fUseLCDText(that.fUseLCDText) {
uint32_t glyphStartIndex() const { return fGlyphStartIndex; }
uint32_t glyphEndIndex() const { return fGlyphEndIndex; }
void glyphAppended() { fGlyphEndIndex++; }
+ void setColor(GrColor color) { fColor = color; }
+ GrColor color() const { return fColor; }
void setMaskFormat(GrMaskFormat format) { fMaskFormat = format; }
GrMaskFormat maskFormat() const { return fMaskFormat; }
size_t fVertexEndIndex;
uint32_t fGlyphStartIndex;
uint32_t fGlyphEndIndex;
+ GrColor fColor;
GrMaskFormat fMaskFormat;
bool fDrawAsDistanceFields; // df property
bool fUseLCDText; // df property
// will have different descriptors. If fOverrideDescriptor is non-nullptr, then it
// will be used in place of the run's descriptor to regen texture coords
SkAutoTDelete<SkAutoDescriptor> fOverrideDescriptor; // df properties
- GrColor fColor;
bool fInitialized;
bool fDrawAsPaths;
};
flushInfo->fGlyphsToFlush++;
}
- // We my have changed the color so update it here
- run->fColor = color;
+ // We may have changed the color so update it here
+ info->setColor(color);
if (regenTexCoords) {
if (regenGlyphs) {
info->setStrike(strike);
bool regenerateTextureCoords = info.atlasGeneration() != currentAtlasGen ||
regenerateGlyphs;
bool regenerateColors = kARGB_GrMaskFormat != maskFormat &&
- run.fColor != args.fColor;
+ info.color() != args.fColor;
bool regeneratePositions = args.fTransX != 0.f || args.fTransY != 0.f;
int glyphCount = info.glyphCount();