| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 SkScalar fTextRatio; | 56 SkScalar fTextRatio; |
| 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 bool fUsingDeviceSpaceGlyphs; | 67 bool fUsingDeviceSpaceGlyphs; |
| 67 | 68 |
| 68 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&); | 69 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&); |
| 69 | 70 |
| 70 virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE; | 71 virtual bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OV
ERRIDE; |
| 71 | 72 |
| 72 virtual void onDrawText(const GrPaint&, const SkPaint&, const char text[], | 73 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view
Matrix, |
| 73 size_t byteLength, | 74 const char text[], size_t byteLength, |
| 74 SkScalar x, SkScalar y) SK_OVERRIDE; | 75 SkScalar x, SkScalar y) SK_OVERRIDE; |
| 75 virtual void onDrawPosText(const GrPaint&, const SkPaint&, | 76 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v
iewMatrix, |
| 76 const char text[], size_t byteLength, | 77 const char text[], size_t byteLength, |
| 77 const SkScalar pos[], int scalarsPerPosition, | 78 const SkScalar pos[], int scalarsPerPosition, |
| 78 const SkPoint& offset) SK_OVERRIDE; | 79 const SkPoint& offset) SK_OVERRIDE; |
| 79 | 80 |
| 80 void init(const GrPaint&, const SkPaint&, size_t textByteLength, RenderMode)
; | 81 void init(const GrPaint&, const SkPaint&, size_t textByteLength, RenderMode, |
| 81 bool mapToFallbackContext(GrContext::AutoMatrix&, SkMatrix* inverse); | 82 const SkMatrix& viewMatrix); |
| 83 bool mapToFallbackContext(SkMatrix* inverse); |
| 82 void appendGlyph(const SkGlyph&, const SkPoint&); | 84 void appendGlyph(const SkGlyph&, const SkPoint&); |
| 83 void flush(); | 85 void flush(); |
| 84 void finish(); | 86 void finish(); |
| 85 | 87 |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 #endif | 90 #endif |
| OLD | NEW |