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 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType); | 47 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, SkColorProfile
Type); |
48 | 48 |
49 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { | 49 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { |
50 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()); | 50 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType(), info.pr
ofileType()); |
51 } | 51 } |
52 | 52 |
53 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); | 53 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig, SkColorType*, SkColorProfi
leType*); |
54 | 54 |
55 static inline GrColor SkColor2GrColor(SkColor c) { | 55 static inline GrColor SkColor2GrColor(SkColor c) { |
56 SkPMColor pm = SkPreMultiplyColor(c); | 56 SkPMColor pm = SkPreMultiplyColor(c); |
57 unsigned r = SkGetPackedR32(pm); | 57 unsigned r = SkGetPackedR32(pm); |
58 unsigned g = SkGetPackedG32(pm); | 58 unsigned g = SkGetPackedG32(pm); |
59 unsigned b = SkGetPackedB32(pm); | 59 unsigned b = SkGetPackedB32(pm); |
60 unsigned a = SkGetPackedA32(pm); | 60 unsigned a = SkGetPackedA32(pm); |
61 return GrColorPackRGBA(r, g, b, a); | 61 return GrColorPackRGBA(r, g, b, a); |
62 } | 62 } |
63 | 63 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 const SkMatrix& viewM, bool constantColor, GrPaint* g
rPaint); | 95 const SkMatrix& viewM, bool constantColor, GrPaint* g
rPaint); |
96 | 96 |
97 //////////////////////////////////////////////////////////////////////////////// | 97 //////////////////////////////////////////////////////////////////////////////// |
98 // Classes | 98 // Classes |
99 | 99 |
100 class SkGlyphCache; | 100 class SkGlyphCache; |
101 | 101 |
102 //////////////////////////////////////////////////////////////////////////////// | 102 //////////////////////////////////////////////////////////////////////////////// |
103 | 103 |
104 #endif | 104 #endif |
OLD | NEW |