| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 GrTextStrike* fStrike; | 26 GrTextStrike* fStrike; |
| 27 void* fVertices; | 27 void* fVertices; |
| 28 int fCurrVertex; | 28 int fCurrVertex; |
| 29 int fAllocVertexCount; | 29 int fAllocVertexCount; |
| 30 int fTotalVertexCount; | 30 int fTotalVertexCount; |
| 31 SkRect fVertexBounds; | 31 SkRect fVertexBounds; |
| 32 GrTexture* fCurrTexture; | 32 GrTexture* fCurrTexture; |
| 33 GrMaskFormat fCurrMaskFormat; | 33 GrMaskFormat fCurrMaskFormat; |
| 34 SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor; | 34 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; |
| 35 SkAutoTUnref<const GrFragmentProcessor> fCachedTextureProcessor; |
| 35 // Used to check whether fCachedEffect is still valid. | 36 // Used to check whether fCachedEffect is still valid. |
| 36 uint32_t fEffectTextureUniqueID; | 37 uint32_t fEffectTextureUniqueID; |
| 37 | 38 |
| 38 GrBitmapTextContext(GrContext*, const SkDeviceProperties&); | 39 GrBitmapTextContext(GrContext*, const SkDeviceProperties&); |
| 39 | 40 |
| 40 virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE; | 41 virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE; |
| 41 | 42 |
| 42 virtual void onDrawText(const GrPaint&, const SkPaint&, const char text[], s
ize_t byteLength, | 43 virtual void onDrawText(const GrPaint&, const SkPaint&, const char text[], s
ize_t byteLength, |
| 43 SkScalar x, SkScalar y) SK_OVERRIDE; | 44 SkScalar x, SkScalar y) SK_OVERRIDE; |
| 44 virtual void onDrawPosText(const GrPaint&, const SkPaint&, | 45 virtual void onDrawPosText(const GrPaint&, const SkPaint&, |
| 45 const char text[], size_t byteLength, | 46 const char text[], size_t byteLength, |
| 46 const SkScalar pos[], int scalarsPerPosition, | 47 const SkScalar pos[], int scalarsPerPosition, |
| 47 const SkPoint& offset) SK_OVERRIDE; | 48 const SkPoint& offset) SK_OVERRIDE; |
| 48 | 49 |
| 49 void init(const GrPaint&, const SkPaint&); | 50 void init(const GrPaint&, const SkPaint&); |
| 50 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); | 51 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*
); |
| 51 bool uploadGlyph(GrGlyph*, GrFontScaler*); | 52 bool uploadGlyph(GrGlyph*, GrFontScaler*); |
| 52 void flush(); // automatically called by destructor | 53 void flush(); // automatically called by destructor |
| 53 void finish(); | 54 void finish(); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 #endif | 57 #endif |
| OLD | NEW |