Index: src/gpu/text/GrDistanceFieldAdjustTable.h |
diff --git a/src/gpu/text/GrDistanceFieldAdjustTable.h b/src/gpu/text/GrDistanceFieldAdjustTable.h |
index f7d8bee0897a4fc37d602e9f7cefbacd125f0b23..f9b5161e95a7b3739d8aa7ae9161b592631820ea 100644 |
--- a/src/gpu/text/GrDistanceFieldAdjustTable.h |
+++ b/src/gpu/text/GrDistanceFieldAdjustTable.h |
@@ -15,17 +15,21 @@ |
// Because the GrAtlasTextContext can go out of scope before the final flush, this needs to be |
// refcnted and malloced |
struct GrDistanceFieldAdjustTable : public SkNVRefCnt<GrDistanceFieldAdjustTable> { |
- GrDistanceFieldAdjustTable() { this->buildDistanceAdjustTable(); } |
- ~GrDistanceFieldAdjustTable() { delete[] fTable; } |
+ GrDistanceFieldAdjustTable() { this->buildDistanceAdjustTables(); } |
+ ~GrDistanceFieldAdjustTable() { |
+ delete[] fTable; |
+ delete[] fSRGBTable; |
+ } |
- const SkScalar& operator[] (int i) const { |
- return fTable[i]; |
+ const SkScalar& getAdjustment(int i, bool useSRGBTable) const { |
+ return useSRGBTable ? fSRGBTable[i] : fTable[i]; |
} |
private: |
- void buildDistanceAdjustTable(); |
+ void buildDistanceAdjustTables(); |
SkScalar* fTable; |
+ SkScalar* fSRGBTable; |
}; |
#endif |