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 GrBitmapTextContext_DEFINED | 8 #ifndef GrBitmapTextContext_DEFINED |
9 #define GrBitmapTextContext_DEFINED | 9 #define GrBitmapTextContext_DEFINED |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 GrTexture* fCurrTexture; | 33 GrTexture* fCurrTexture; |
34 GrMaskFormat fCurrMaskFormat; | 34 GrMaskFormat fCurrMaskFormat; |
35 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; | 35 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; |
36 // Used to check whether fCachedEffect is still valid. | 36 // Used to check whether fCachedEffect is still valid. |
37 uint32_t fEffectTextureUniqueID; | 37 uint32_t fEffectTextureUniqueID; |
38 SkMatrix fLocalMatrix; | 38 SkMatrix fLocalMatrix; |
39 | 39 |
40 GrBitmapTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&); | 40 GrBitmapTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&); |
41 | 41 |
42 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, | 42 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, |
43 const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE; | 43 const SkPaint&, const SkMatrix& viewMatrix) override; |
44 | 44 |
45 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, | 45 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, |
46 const SkMatrix& viewMatrix, const char text[], size_t byteLe
ngth, | 46 const SkMatrix& viewMatrix, const char text[], size_t byteLe
ngth, |
47 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_
OVERRIDE; | 47 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; |
48 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, | 48 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, |
49 const SkMatrix& viewMatrix, | 49 const SkMatrix& viewMatrix, |
50 const char text[], size_t byteLength, | 50 const char text[], size_t byteLength, |
51 const SkScalar pos[], int scalarsPerPosition, | 51 const SkScalar pos[], int scalarsPerPosition, |
52 const SkPoint& offset, const SkIRect& regionClipBounds) S
K_OVERRIDE; | 52 const SkPoint& offset, const SkIRect& regionClipBounds) o
verride; |
53 | 53 |
54 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, | 54 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, |
55 const SkIRect& regionClipBounds); | 55 const SkIRect& regionClipBounds); |
56 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); | 56 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); |
57 bool uploadGlyph(GrGlyph*, GrFontScaler*); | 57 bool uploadGlyph(GrGlyph*, GrFontScaler*); |
58 void flush(); // automatically called by destructor | 58 void flush(); // automatically called by destructor |
59 void finish(); | 59 void finish(); |
60 }; | 60 }; |
61 | 61 |
62 #endif | 62 #endif |
OLD | NEW |