| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| 11 #ifndef SkGr_DEFINED | 11 #ifndef SkGr_DEFINED |
| 12 #define SkGr_DEFINED | 12 #define SkGr_DEFINED |
| 13 | 13 |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 | 15 |
| 16 // Gr headers | 16 // Gr headers |
| 17 #include "GrTypes.h" | 17 #include "GrTypes.h" |
| 18 #include "GrContext.h" | 18 #include "GrContext.h" |
| 19 #include "GrFontScaler.h" | |
| 20 | 19 |
| 21 // skia headers | 20 // skia headers |
| 22 #include "SkBitmap.h" | 21 #include "SkBitmap.h" |
| 23 #include "SkPath.h" | 22 #include "SkPath.h" |
| 24 #include "SkPoint.h" | 23 #include "SkPoint.h" |
| 25 #include "SkRegion.h" | 24 #include "SkRegion.h" |
| 26 #include "SkClipStack.h" | 25 #include "SkClipStack.h" |
| 27 | 26 |
| 28 //////////////////////////////////////////////////////////////////////////////// | 27 //////////////////////////////////////////////////////////////////////////////// |
| 29 // Sk to Gr Type conversions | 28 // Sk to Gr Type conversions |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // skPaint's shader to a GrTexture/GrEffectStage if possible. | 96 // skPaint's shader to a GrTexture/GrEffectStage if possible. |
| 98 // constantColor has the same meaning as in skPaint2GrPaintNoShader. | 97 // constantColor has the same meaning as in skPaint2GrPaintNoShader. |
| 99 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint, | 98 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint, |
| 100 bool constantColor, GrPaint* grPaint); | 99 bool constantColor, GrPaint* grPaint); |
| 101 | 100 |
| 102 //////////////////////////////////////////////////////////////////////////////// | 101 //////////////////////////////////////////////////////////////////////////////// |
| 103 // Classes | 102 // Classes |
| 104 | 103 |
| 105 class SkGlyphCache; | 104 class SkGlyphCache; |
| 106 | 105 |
| 107 class SkGrFontScaler : public GrFontScaler { | |
| 108 public: | |
| 109 explicit SkGrFontScaler(SkGlyphCache* strike); | |
| 110 virtual ~SkGrFontScaler(); | |
| 111 | |
| 112 // overrides | |
| 113 virtual const GrKey* getKey(); | |
| 114 virtual GrMaskFormat getMaskFormat(); | |
| 115 virtual bool getPackedGlyphBounds(GrGlyph::PackedID, SkIRect* bounds) SK_OVE
RRIDE; | |
| 116 virtual bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height, | |
| 117 int rowBytes, void* image) SK_OVERRIDE; | |
| 118 virtual bool getPackedGlyphDFBounds(GrGlyph::PackedID, SkIRect* bounds) SK_O
VERRIDE; | |
| 119 virtual bool getPackedGlyphDFImage(GrGlyph::PackedID, int width, int height, | |
| 120 void* image) SK_OVERRIDE; | |
| 121 virtual bool getGlyphPath(uint16_t glyphID, SkPath*); | |
| 122 | |
| 123 private: | |
| 124 SkGlyphCache* fStrike; | |
| 125 GrKey* fKey; | |
| 126 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); | |
| 127 }; | |
| 128 | |
| 129 //////////////////////////////////////////////////////////////////////////////// | 106 //////////////////////////////////////////////////////////////////////////////// |
| 130 | 107 |
| 131 #endif | 108 #endif |
| OLD | NEW |