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 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 //////////////////////////////////////////////////////////////////////////////// | 70 //////////////////////////////////////////////////////////////////////////////// |
71 | 71 |
72 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*
); | 72 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*
); |
73 | 73 |
74 GrTexture* GrLockAndRefCachedBitmapTexture(GrContext*, const SkBitmap&, const Gr
TextureParams*); | 74 GrTexture* GrLockAndRefCachedBitmapTexture(GrContext*, const SkBitmap&, const Gr
TextureParams*); |
75 | 75 |
76 void GrUnlockAndUnrefCachedBitmapTexture(GrTexture*); | 76 void GrUnlockAndUnrefCachedBitmapTexture(GrTexture*); |
77 | 77 |
78 //////////////////////////////////////////////////////////////////////////////// | 78 //////////////////////////////////////////////////////////////////////////////// |
79 | 79 |
80 class SkGpuDevice; | |
81 | |
82 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. | 80 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. |
83 // justAlpha indicates that the SkPaint's alpha should be used rather than the c
olor. | 81 // justAlpha indicates that the SkPaint's alpha should be used rather than the c
olor. |
84 // Callers may subsequently modify the GrPaint. Setting constantColor indicates | 82 // Callers may subsequently modify the GrPaint. Setting constantColor indicates |
85 // that the final paint will draw the same color at every pixel. This allows | 83 // that the final paint will draw the same color at every pixel. This allows |
86 // an optimization where the the color filter can be applied to the SkPaint's | 84 // an optimization where the the color filter can be applied to the SkPaint's |
87 // color once while converting to GrPaint and then ignored. | 85 // color once while converting to GrPaint and then ignored. |
88 void SkPaint2GrPaintNoShader(SkGpuDevice* dev, const SkPaint& skPaint, bool just
Alpha, | 86 void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, bool ju
stAlpha, |
89 bool constantColor, GrPaint* grPaint); | 87 bool constantColor, GrPaint* grPaint); |
90 | 88 |
91 // This function is similar to skPaint2GrPaintNoShader but also converts | 89 // This function is similar to skPaint2GrPaintNoShader but also converts |
92 // skPaint's shader to a GrTexture/GrEffectStage if possible. | 90 // skPaint's shader to a GrTexture/GrEffectStage if possible. |
93 // constantColor has the same meaning as in skPaint2GrPaintNoShader. | 91 // constantColor has the same meaning as in skPaint2GrPaintNoShader. |
94 void SkPaint2GrPaintShader(SkGpuDevice* dev, const SkPaint& skPaint, | 92 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint, |
95 bool constantColor, GrPaint* grPaint); | 93 bool constantColor, GrPaint* grPaint); |
96 | 94 |
97 //////////////////////////////////////////////////////////////////////////////// | 95 //////////////////////////////////////////////////////////////////////////////// |
98 // Classes | 96 // Classes |
99 | 97 |
100 class SkGlyphCache; | 98 class SkGlyphCache; |
101 | 99 |
102 class SkGrFontScaler : public GrFontScaler { | 100 class SkGrFontScaler : public GrFontScaler { |
103 public: | 101 public: |
104 explicit SkGrFontScaler(SkGlyphCache* strike); | 102 explicit SkGrFontScaler(SkGlyphCache* strike); |
(...skipping 12 matching lines...) Expand all Loading... |
117 | 115 |
118 private: | 116 private: |
119 SkGlyphCache* fStrike; | 117 SkGlyphCache* fStrike; |
120 GrKey* fKey; | 118 GrKey* fKey; |
121 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); | 119 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); |
122 }; | 120 }; |
123 | 121 |
124 //////////////////////////////////////////////////////////////////////////////// | 122 //////////////////////////////////////////////////////////////////////////////// |
125 | 123 |
126 #endif | 124 #endif |
OLD | NEW |