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 26 matching lines...) Expand all Loading... |
37 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 37 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
38 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 38 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
39 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 39 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
40 | 40 |
41 #define sk_blend_to_grblend(X) ((GrBlendCoeff)(X)) | 41 #define sk_blend_to_grblend(X) ((GrBlendCoeff)(X)) |
42 | 42 |
43 /////////////////////////////////////////////////////////////////////////////// | 43 /////////////////////////////////////////////////////////////////////////////// |
44 | 44 |
45 #include "SkColorPriv.h" | 45 #include "SkColorPriv.h" |
46 | 46 |
47 #ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG | |
48 /** | |
49 * Convert the SkBitmap::Config to the corresponding PixelConfig, or | |
50 * kUnknown_PixelConfig if the conversion cannot be done. | |
51 */ | |
52 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); | |
53 #endif | |
54 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType); | 47 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType); |
55 | 48 |
56 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { | 49 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { |
57 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()); | 50 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()); |
58 } | 51 } |
59 | 52 |
60 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); | 53 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); |
61 | 54 |
62 static inline GrColor SkColor2GrColor(SkColor c) { | 55 static inline GrColor SkColor2GrColor(SkColor c) { |
63 SkPMColor pm = SkPreMultiplyColor(c); | 56 SkPMColor pm = SkPreMultiplyColor(c); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool constantColor, GrPaint* grPaint); | 92 bool constantColor, GrPaint* grPaint); |
100 | 93 |
101 //////////////////////////////////////////////////////////////////////////////// | 94 //////////////////////////////////////////////////////////////////////////////// |
102 // Classes | 95 // Classes |
103 | 96 |
104 class SkGlyphCache; | 97 class SkGlyphCache; |
105 | 98 |
106 //////////////////////////////////////////////////////////////////////////////// | 99 //////////////////////////////////////////////////////////////////////////////// |
107 | 100 |
108 #endif | 101 #endif |
OLD | NEW |