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 fCurrVertex; | 45 int fCurrVertex; |
46 int fAllocVertexCount; | 46 int fAllocVertexCount; |
47 int fTotalVertexCount; | 47 int fTotalVertexCount; |
48 GrTexture* fCurrTexture; | 48 GrTexture* fCurrTexture; |
49 SkRect fVertexBounds; | 49 SkRect fVertexBounds; |
50 SkMatrix fViewMatrix; | 50 SkMatrix fViewMatrix; |
51 | 51 |
52 GrDistanceFieldTextContext(GrContext*, SkGpuDevice*, const SkDevicePropertie
s&, bool enable); | 52 GrDistanceFieldTextContext(GrContext*, SkGpuDevice*, const SkDevicePropertie
s&, bool enable); |
53 | 53 |
54 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, | 54 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, |
55 const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE; | 55 const SkPaint&, const SkMatrix& viewMatrix) override; |
56 | 56 |
57 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, | 57 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, |
58 const SkMatrix& viewMatrix, | 58 const SkMatrix& viewMatrix, |
59 const char text[], size_t byteLength, | 59 const char text[], size_t byteLength, |
60 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_
OVERRIDE; | 60 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; |
61 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, | 61 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, |
62 const SkMatrix& viewMatrix, | 62 const SkMatrix& viewMatrix, |
63 const char text[], size_t byteLength, | 63 const char text[], size_t byteLength, |
64 const SkScalar pos[], int scalarsPerPosition, | 64 const SkScalar pos[], int scalarsPerPosition, |
65 const SkPoint& offset, const SkIRect& regionClipBounds) S
K_OVERRIDE; | 65 const SkPoint& offset, const SkIRect& regionClipBounds) o
verride; |
66 | 66 |
67 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, | 67 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, |
68 const SkIRect& regionClipBounds); | 68 const SkIRect& regionClipBounds); |
69 bool appendGlyph(GrGlyph::PackedID, SkScalar left, SkScalar top, GrFontScale
r*); | 69 bool appendGlyph(GrGlyph::PackedID, SkScalar left, SkScalar top, GrFontScale
r*); |
70 bool uploadGlyph(GrGlyph*, GrFontScaler*); | 70 bool uploadGlyph(GrGlyph*, GrFontScaler*); |
71 void setupCoverageEffect(const SkColor& filteredColor); | 71 void setupCoverageEffect(const SkColor& filteredColor); |
72 void flush(); // automatically called by destructor | 72 void flush(); // automatically called by destructor |
73 void finish(); | 73 void finish(); |
74 }; | 74 }; |
75 | 75 |
76 #endif | 76 #endif |
OLD | NEW |