Index: src/gpu/GrAtlasTextContext.h |
diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h |
index 567bf1ca42833ce824855b511320246142be6aa4..104085d7482cd19b44ba1d9c0f99c96c26b6bd72 100644 |
--- a/src/gpu/GrAtlasTextContext.h |
+++ b/src/gpu/GrAtlasTextContext.h |
@@ -230,14 +230,24 @@ private: |
mutable SkScalar fTotalXError; |
mutable SkScalar fTotalYError; |
#endif |
+ SkColor fPaintColor; |
SkScalar fX; |
SkScalar fY; |
- SkColor fPaintColor; |
+ |
+ // We can regenerate distance field text, but only if the new viewmatrix would not result in |
jvanverth1
2015/04/21 15:29:47
s/regenerate/reuse/ ?
|
+ // a mip change. Because there can be multiple runs in a blob, we track the overall |
+ // maximum minimum scale, and minimum maximum scale, we can support before we need to regen |
+ SkScalar fMaxMinScale; |
+ SkScalar fMinMaxScale; |
int fRunCount; |
bool fHasDistanceField; |
bool fHasBitmap; |
- BitmapTextBlob() : fHasDistanceField(false), fHasBitmap(false) {} |
+ BitmapTextBlob() |
+ : fMaxMinScale(SK_ScalarMax) |
+ , fMinMaxScale(SK_ScalarMax) |
+ , fHasDistanceField(false) |
+ , fHasBitmap(false) {} |
static const Key& GetKey(const BitmapTextBlob& blob) { |
return blob.fKey; |
@@ -348,7 +358,8 @@ private: |
SkDrawFilter* drawFilter, const SkIRect& clipRect, GrRenderTarget*, |
const GrClip&, const GrPaint&); |
inline static bool HasLCD(const SkTextBlob*); |
- inline void initDistanceFieldPaint(SkPaint*, SkScalar* textRatio, const SkMatrix&); |
+ inline void initDistanceFieldPaint(BitmapTextBlob*, SkPaint*, SkScalar* textRatio, |
+ const SkMatrix&); |
// Distance field text needs this table to compute a value for use in the fragment shader. |
// Because the GrAtlasTextContext can go out of scope before the final flush, this needs to be |