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 27 matching lines...) Expand all Loading... |
38 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 38 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
39 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 39 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
40 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 40 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
41 | 41 |
42 #define sk_blend_to_grblend(X) ((GrBlendCoeff)(X)) | 42 #define sk_blend_to_grblend(X) ((GrBlendCoeff)(X)) |
43 | 43 |
44 /////////////////////////////////////////////////////////////////////////////// | 44 /////////////////////////////////////////////////////////////////////////////// |
45 | 45 |
46 #include "SkColorPriv.h" | 46 #include "SkColorPriv.h" |
47 | 47 |
| 48 #ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG |
48 /** | 49 /** |
49 * Convert the SkBitmap::Config to the corresponding PixelConfig, or | 50 * Convert the SkBitmap::Config to the corresponding PixelConfig, or |
50 * kUnknown_PixelConfig if the conversion cannot be done. | 51 * kUnknown_PixelConfig if the conversion cannot be done. |
51 */ | 52 */ |
52 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); | 53 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); |
| 54 #endif |
53 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType); | 55 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType); |
54 | 56 |
55 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { | 57 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { |
56 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()); | 58 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()); |
57 } | 59 } |
58 | 60 |
59 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); | 61 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); |
60 | 62 |
61 static inline GrColor SkColor2GrColor(SkColor c) { | 63 static inline GrColor SkColor2GrColor(SkColor c) { |
62 SkPMColor pm = SkPreMultiplyColor(c); | 64 SkPMColor pm = SkPreMultiplyColor(c); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 122 |
121 private: | 123 private: |
122 SkGlyphCache* fStrike; | 124 SkGlyphCache* fStrike; |
123 GrKey* fKey; | 125 GrKey* fKey; |
124 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); | 126 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); |
125 }; | 127 }; |
126 | 128 |
127 //////////////////////////////////////////////////////////////////////////////// | 129 //////////////////////////////////////////////////////////////////////////////// |
128 | 130 |
129 #endif | 131 #endif |
OLD | NEW |