| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrStencilAndCoverTextContext_DEFINED | 8 #ifndef GrStencilAndCoverTextContext_DEFINED |
| 9 #define GrStencilAndCoverTextContext_DEFINED | 9 #define GrStencilAndCoverTextContext_DEFINED |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 float fTextInverseRatio; | 57 float fTextInverseRatio; |
| 58 SkGlyphCache* fGlyphCache; | 58 SkGlyphCache* fGlyphCache; |
| 59 GrPathRange* fGlyphs; | 59 GrPathRange* fGlyphs; |
| 60 SkStrokeRec fStroke; | 60 SkStrokeRec fStroke; |
| 61 uint16_t fGlyphIndices[kGlyphBufferSize]; | 61 uint16_t fGlyphIndices[kGlyphBufferSize]; |
| 62 SkPoint fGlyphPositions[kGlyphBufferSize]; | 62 SkPoint fGlyphPositions[kGlyphBufferSize]; |
| 63 int fQueuedGlyphCount; | 63 int fQueuedGlyphCount; |
| 64 int fFallbackGlyphsIdx; | 64 int fFallbackGlyphsIdx; |
| 65 SkMatrix fContextInitialMatrix; | 65 SkMatrix fContextInitialMatrix; |
| 66 SkMatrix fViewMatrix; | 66 SkMatrix fViewMatrix; |
| 67 SkMatrix fLocalMatrix; |
| 67 bool fUsingDeviceSpaceGlyphs; | 68 bool fUsingDeviceSpaceGlyphs; |
| 68 | 69 |
| 69 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&); | 70 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&); |
| 70 | 71 |
| 71 virtual bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OV
ERRIDE; | 72 virtual bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OV
ERRIDE; |
| 72 | 73 |
| 73 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view
Matrix, | 74 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view
Matrix, |
| 74 const char text[], size_t byteLength, | 75 const char text[], size_t byteLength, |
| 75 SkScalar x, SkScalar y) SK_OVERRIDE; | 76 SkScalar x, SkScalar y) SK_OVERRIDE; |
| 76 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v
iewMatrix, | 77 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v
iewMatrix, |
| 77 const char text[], size_t byteLength, | 78 const char text[], size_t byteLength, |
| 78 const SkScalar pos[], int scalarsPerPosition, | 79 const SkScalar pos[], int scalarsPerPosition, |
| 79 const SkPoint& offset) SK_OVERRIDE; | 80 const SkPoint& offset) SK_OVERRIDE; |
| 80 | 81 |
| 81 void init(const GrPaint&, const SkPaint&, size_t textByteLength, RenderMode, | 82 void init(const GrPaint&, const SkPaint&, size_t textByteLength, RenderMode, |
| 82 const SkMatrix& viewMatrix); | 83 const SkMatrix& viewMatrix); |
| 83 bool mapToFallbackContext(SkMatrix* inverse); | 84 bool mapToFallbackContext(SkMatrix* inverse); |
| 84 void appendGlyph(const SkGlyph&, const SkPoint&); | 85 void appendGlyph(const SkGlyph&, const SkPoint&); |
| 85 void flush(); | 86 void flush(); |
| 86 void finish(); | 87 void finish(); |
| 87 | 88 |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 #endif | 91 #endif |
| OLD | NEW |