| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrDistanceFieldTextContext_DEFINED | 8 #ifndef GrDistanceFieldTextContext_DEFINED |
| 9 #define GrDistanceFieldTextContext_DEFINED | 9 #define GrDistanceFieldTextContext_DEFINED |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 int fAllocVertexCount; | 45 int fAllocVertexCount; |
| 46 int fTotalVertexCount; | 46 int fTotalVertexCount; |
| 47 GrTexture* fCurrTexture; | 47 GrTexture* fCurrTexture; |
| 48 SkRect fVertexBounds; | 48 SkRect fVertexBounds; |
| 49 SkMatrix fViewMatrix; | 49 SkMatrix fViewMatrix; |
| 50 | 50 |
| 51 GrDistanceFieldTextContext(GrContext*, const SkDeviceProperties&, bool enabl
e); | 51 GrDistanceFieldTextContext(GrContext*, const SkDeviceProperties&, bool enabl
e); |
| 52 | 52 |
| 53 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; | 53 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; |
| 54 | 54 |
| 55 virtual void onDrawText(GrRenderTarget*, const GrPaint&, const SkPaint&, | 55 virtual void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, cons
t SkPaint&, |
| 56 const SkMatrix& viewMatrix, | 56 const SkMatrix& viewMatrix, |
| 57 const char text[], size_t byteLength, | 57 const char text[], size_t byteLength, |
| 58 SkScalar x, SkScalar y) SK_OVERRIDE; | 58 SkScalar x, SkScalar y) SK_OVERRIDE; |
| 59 virtual void onDrawPosText(GrRenderTarget*, const GrPaint&, const SkPaint&, | 59 virtual void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, c
onst SkPaint&, |
| 60 const SkMatrix& viewMatrix, | 60 const SkMatrix& viewMatrix, |
| 61 const char text[], size_t byteLength, | 61 const char text[], size_t byteLength, |
| 62 const SkScalar pos[], int scalarsPerPosition, | 62 const SkScalar pos[], int scalarsPerPosition, |
| 63 const SkPoint& offset) SK_OVERRIDE; | 63 const SkPoint& offset) SK_OVERRIDE; |
| 64 | 64 |
| 65 void init(GrRenderTarget*, const GrPaint&, const SkPaint&); | 65 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&); |
| 66 bool appendGlyph(GrGlyph::PackedID, SkScalar left, SkScalar top, GrFontScale
r*); | 66 bool appendGlyph(GrGlyph::PackedID, SkScalar left, SkScalar top, GrFontScale
r*); |
| 67 bool uploadGlyph(GrGlyph*, GrFontScaler*); | 67 bool uploadGlyph(GrGlyph*, GrFontScaler*); |
| 68 void setupCoverageEffect(const SkColor& filteredColor); | 68 void setupCoverageEffect(const SkColor& filteredColor); |
| 69 void flush(); // automatically called by destructor | 69 void flush(); // automatically called by destructor |
| 70 void finish(); | 70 void finish(); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 #endif | 73 #endif |
| OLD | NEW |