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 21 matching lines...) Expand all Loading... |
32 SkRect fVertexBounds; | 32 SkRect fVertexBounds; |
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*, const SkDeviceProperties&); | 40 GrBitmapTextContext(GrContext*, const SkDeviceProperties&); |
41 | 41 |
42 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; | 42 bool canDraw(const GrRenderTarget*, const SkPaint&, const SkMatrix& viewMatr
ix) SK_OVERRIDE; |
43 | 43 |
44 virtual void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, cons
t SkPaint&, | 44 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, |
45 const SkMatrix& viewMatrix, const char text[], size_
t byteLength, | 45 const SkMatrix& viewMatrix, const char text[], size_t byteLe
ngth, |
46 SkScalar x, SkScalar y) SK_OVERRIDE; | 46 SkScalar x, SkScalar y) SK_OVERRIDE; |
47 virtual void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, c
onst SkPaint&, | 47 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint&, |
48 const SkMatrix& viewMatrix, | 48 const SkMatrix& viewMatrix, |
49 const char text[], size_t byteLength, | 49 const char text[], size_t byteLength, |
50 const SkScalar pos[], int scalarsPerPosition, | 50 const SkScalar pos[], int scalarsPerPosition, |
51 const SkPoint& offset) SK_OVERRIDE; | 51 const SkPoint& offset) SK_OVERRIDE; |
52 | 52 |
53 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&); | 53 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&); |
54 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); | 54 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); |
55 bool uploadGlyph(GrGlyph*, GrFontScaler*); | 55 bool uploadGlyph(GrGlyph*, GrFontScaler*); |
56 void flush(); // automatically called by destructor | 56 void flush(); // automatically called by destructor |
57 void finish(); | 57 void finish(); |
58 }; | 58 }; |
59 | 59 |
60 #endif | 60 #endif |
OLD | NEW |