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 20 matching lines...) Expand all Loading... |
31 SkRect fVertexBounds; | 31 SkRect fVertexBounds; |
32 GrTexture* fCurrTexture; | 32 GrTexture* fCurrTexture; |
33 GrMaskFormat fCurrMaskFormat; | 33 GrMaskFormat fCurrMaskFormat; |
34 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; | 34 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; |
35 SkAutoTUnref<const GrFragmentProcessor> fCachedTextureProcessor; | 35 SkAutoTUnref<const GrFragmentProcessor> fCachedTextureProcessor; |
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 | 38 |
39 GrBitmapTextContext(GrContext*, const SkDeviceProperties&); | 39 GrBitmapTextContext(GrContext*, const SkDeviceProperties&); |
40 | 40 |
41 virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE; | 41 virtual bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OV
ERRIDE; |
42 | 42 |
43 virtual void onDrawText(const GrPaint&, const SkPaint&, const char text[], s
ize_t byteLength, | 43 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view
Matrix, |
| 44 const char text[], size_t byteLength, |
44 SkScalar x, SkScalar y) SK_OVERRIDE; | 45 SkScalar x, SkScalar y) SK_OVERRIDE; |
45 virtual void onDrawPosText(const GrPaint&, const SkPaint&, | 46 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v
iewMatrix, |
46 const char text[], size_t byteLength, | 47 const char text[], size_t byteLength, |
47 const SkScalar pos[], int scalarsPerPosition, | 48 const SkScalar pos[], int scalarsPerPosition, |
48 const SkPoint& offset) SK_OVERRIDE; | 49 const SkPoint& offset) SK_OVERRIDE; |
49 | 50 |
50 void init(const GrPaint&, const SkPaint&); | 51 void init(const GrPaint&, const SkPaint&); |
51 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); | 52 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); |
52 bool uploadGlyph(GrGlyph*, GrFontScaler*); | 53 bool uploadGlyph(GrGlyph*, GrFontScaler*); |
53 void flush(); // automatically called by destructor | 54 void flush(); // automatically called by destructor |
54 void finish(); | 55 void finish(); |
55 }; | 56 }; |
56 | 57 |
57 #endif | 58 #endif |
OLD | NEW |