Chromium Code Reviews| Index: src/gpu/GrAtlasTextContext.h |
| diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h |
| index cf2ba6bcc2cb947152e7a31fa2b075275fbf2a41..356f69b2d9f431a2fb286bde72f1bfd25b77f1b6 100644 |
| --- a/src/gpu/GrAtlasTextContext.h |
| +++ b/src/gpu/GrAtlasTextContext.h |
| @@ -210,6 +210,14 @@ private: |
| StrokeInfo fStrokeInfo; |
| GrMemoryPool* fPool; |
| + enum TextType { |
| + kHasDistanceField_TextType = 0x1, |
| + kHasBitmap_TextType = 0x2, |
| + }; |
| + uint8_t fTextType; |
|
jvanverth1
2015/04/21 14:04:34
This member will be padded due to the unsigned cha
|
| + |
| + BitmapTextBlob() : fTextType(0) {} |
| + |
| // all glyph / vertex offsets are into these pools. |
| unsigned char* fVertices; |
| GrGlyph::PackedID* fGlyphIDs; |
| @@ -255,6 +263,11 @@ private: |
| void operator delete(void* target, void* placement) { |
| ::operator delete(target, placement); |
| } |
| + |
| + bool hasDistanceField() const { return fTextType & kHasDistanceField_TextType; } |
| + bool hasBitmap() const { return fTextType & kHasBitmap_TextType; } |
| + void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } |
| + void setHasBitmap() { fTextType |= kHasBitmap_TextType; } |
| }; |
| typedef BitmapTextBlob::Run Run; |
| @@ -293,7 +306,8 @@ private: |
| const GrPaint&, const GrClip&); |
| // A helper for drawing BitmapText in a run of distance fields |
| - inline void fallbackDrawPosText(BitmapTextBlob*, GrRenderTarget*, const GrClip&, |
| + inline void fallbackDrawPosText(BitmapTextBlob*, int runIndex, |
| + GrRenderTarget*, const GrClip&, |
| const GrPaint&, |
| const SkPaint&, const SkMatrix& viewMatrix, |
| const SkTDArray<char>& fallbackTxt, |
| @@ -339,7 +353,8 @@ private: |
| void regenerateTextBlob(BitmapTextBlob* bmp, const SkPaint& skPaint, GrColor, |
| const SkMatrix& viewMatrix, |
| const SkTextBlob* blob, SkScalar x, SkScalar y, |
| - SkDrawFilter* drawFilter, const SkIRect& clipRect); |
| + SkDrawFilter* drawFilter, const SkIRect& clipRect, GrRenderTarget*, |
| + const GrClip&, const GrPaint&); |
| inline static bool HasLCD(const SkTextBlob*); |
| inline void initDistanceFieldPaint(SkPaint*, SkScalar* textRatio, const SkMatrix&); |