Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: src/gpu/GrAtlasTextBlob.h

Issue 1513723002: Fix bug with GrAtlasTextContext color regen (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext4
Patch Set: nit Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextBlob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextBlob.h
diff --git a/src/gpu/GrAtlasTextBlob.h b/src/gpu/GrAtlasTextBlob.h
index 6f92c1efebc8666e988806d5b8a93d67ad754f8b..a4007829773b801e91e9a2c59c4e7c1cbe4d824e 100644
--- a/src/gpu/GrAtlasTextBlob.h
+++ b/src/gpu/GrAtlasTextBlob.h
@@ -63,8 +63,7 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
*/
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
@@ -77,6 +76,7 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
, fVertexEndIndex(0)
, fGlyphStartIndex(0)
, fGlyphEndIndex(0)
+ , fColor(GrColor_ILLEGAL)
, fMaskFormat(kA8_GrMaskFormat)
, fDrawAsDistanceFields(false)
, fUseLCDText(false) {}
@@ -88,6 +88,7 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
, fVertexEndIndex(that.fVertexEndIndex)
, fGlyphStartIndex(that.fGlyphStartIndex)
, fGlyphEndIndex(that.fGlyphEndIndex)
+ , fColor(that.fColor)
, fMaskFormat(that.fMaskFormat)
, fDrawAsDistanceFields(that.fDrawAsDistanceFields)
, fUseLCDText(that.fUseLCDText) {
@@ -113,6 +114,8 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
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; }
@@ -138,6 +141,7 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
size_t fVertexEndIndex;
uint32_t fGlyphStartIndex;
uint32_t fGlyphEndIndex;
+ GrColor fColor;
GrMaskFormat fMaskFormat;
bool fDrawAsDistanceFields; // df property
bool fUseLCDText; // df property
@@ -162,7 +166,6 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
// 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;
};
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698