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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 /////////////////////////////////////////////////////////////////////////////// | 44 /////////////////////////////////////////////////////////////////////////////// |
45 | 45 |
46 #include "SkColorPriv.h" | 46 #include "SkColorPriv.h" |
47 | 47 |
48 /** | 48 /** |
49 * Convert the SkBitmap::Config to the corresponding PixelConfig, or | 49 * Convert the SkBitmap::Config to the corresponding PixelConfig, or |
50 * kUnknown_PixelConfig if the conversion cannot be done. | 50 * kUnknown_PixelConfig if the conversion cannot be done. |
51 */ | 51 */ |
52 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); | 52 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); |
53 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); | |
54 | 53 |
55 static inline GrColor SkColor2GrColor(SkColor c) { | 54 static inline GrColor SkColor2GrColor(SkColor c) { |
56 SkPMColor pm = SkPreMultiplyColor(c); | 55 SkPMColor pm = SkPreMultiplyColor(c); |
57 unsigned r = SkGetPackedR32(pm); | 56 unsigned r = SkGetPackedR32(pm); |
58 unsigned g = SkGetPackedG32(pm); | 57 unsigned g = SkGetPackedG32(pm); |
59 unsigned b = SkGetPackedB32(pm); | 58 unsigned b = SkGetPackedB32(pm); |
60 unsigned a = SkGetPackedA32(pm); | 59 unsigned a = SkGetPackedA32(pm); |
61 return GrColorPackRGBA(r, g, b, a); | 60 return GrColorPackRGBA(r, g, b, a); |
62 } | 61 } |
63 | 62 |
(...skipping 25 matching lines...) Expand all Loading... |
89 | 88 |
90 private: | 89 private: |
91 SkGlyphCache* fStrike; | 90 SkGlyphCache* fStrike; |
92 GrKey* fKey; | 91 GrKey* fKey; |
93 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); | 92 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); |
94 }; | 93 }; |
95 | 94 |
96 //////////////////////////////////////////////////////////////////////////////// | 95 //////////////////////////////////////////////////////////////////////////////// |
97 | 96 |
98 #endif | 97 #endif |
OLD | NEW |