| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 GrPathRange* fGlyphs; | 61 GrPathRange* fGlyphs; |
| 62 GrStrokeInfo fStroke; | 62 GrStrokeInfo fStroke; |
| 63 uint16_t fGlyphIndices[kGlyphBuff
erSize]; | 63 uint16_t fGlyphIndices[kGlyphBuff
erSize]; |
| 64 SkPoint fGlyphPositions[kGlyphBu
fferSize]; | 64 SkPoint fGlyphPositions[kGlyphBu
fferSize]; |
| 65 int fQueuedGlyphCount; | 65 int fQueuedGlyphCount; |
| 66 int fFallbackGlyphsIdx; | 66 int fFallbackGlyphsIdx; |
| 67 SkMatrix fContextInitialMatrix; | 67 SkMatrix fContextInitialMatrix; |
| 68 SkMatrix fViewMatrix; | 68 SkMatrix fViewMatrix; |
| 69 SkMatrix fLocalMatrix; | 69 SkMatrix fLocalMatrix; |
| 70 bool fUsingDeviceSpaceGlyphs; | 70 bool fUsingDeviceSpaceGlyphs; |
| 71 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
| 72 GrClip fClip; |
| 73 SkIRect fClipRect; |
| 74 SkIRect fRegionClipBounds; |
| 75 GrPaint fPaint; |
| 76 SkPaint fSkPaint; |
| 71 | 77 |
| 72 GrStencilAndCoverTextContext(GrContext*, GrDrawContext*, const SkSurfaceProp
s&); | 78 GrStencilAndCoverTextContext(GrContext*, GrDrawContext*, const SkSurfaceProp
s&); |
| 73 | 79 |
| 74 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, | 80 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, |
| 75 const SkPaint&, const SkMatrix& viewMatrix) override; | 81 const SkPaint&, const SkMatrix& viewMatrix) override; |
| 76 | 82 |
| 77 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, | 83 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, |
| 78 const SkMatrix& viewMatrix, | 84 const SkMatrix& viewMatrix, |
| 79 const char text[], size_t byteLength, | 85 const char text[], size_t byteLength, |
| 80 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; | 86 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; |
| 81 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, | 87 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, |
| 82 const SkMatrix& viewMatrix, | 88 const SkMatrix& viewMatrix, |
| 83 const char text[], size_t byteLength, | 89 const char text[], size_t byteLength, |
| 84 const SkScalar pos[], int scalarsPerPosition, | 90 const SkScalar pos[], int scalarsPerPosition, |
| 85 const SkPoint& offset, const SkIRect& regionClipBounds) o
verride; | 91 const SkPoint& offset, const SkIRect& regionClipBounds) o
verride; |
| 86 | 92 |
| 87 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, | 93 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, |
| 88 size_t textByteLength, RenderMode, const SkMatrix& viewMatrix, | 94 size_t textByteLength, RenderMode, const SkMatrix& viewMatrix, |
| 89 const SkIRect& regionClipBounds); | 95 const SkIRect& regionClipBounds); |
| 90 bool mapToFallbackContext(SkMatrix* inverse); | 96 bool mapToFallbackContext(SkMatrix* inverse); |
| 91 void appendGlyph(const SkGlyph&, const SkPoint&); | 97 void appendGlyph(const SkGlyph&, const SkPoint&); |
| 92 void flush(); | 98 void flush(); |
| 93 void finish(); | 99 void finish(); |
| 94 | 100 |
| 95 }; | 101 }; |
| 96 | 102 |
| 97 #endif | 103 #endif |
| OLD | NEW |