OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkGr_DEFINED | 8 #ifndef SkGr_DEFINED |
9 #define SkGr_DEFINED | 9 #define SkGr_DEFINED |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 static inline GrColor SkPMColorToGrColor(SkPMColor c) { | 62 static inline GrColor SkPMColorToGrColor(SkPMColor c) { |
63 return GrColorPackRGBA(SkGetPackedR32(c), SkGetPackedG32(c), SkGetPackedB32(
c), | 63 return GrColorPackRGBA(SkGetPackedR32(c), SkGetPackedG32(c), SkGetPackedB32(
c), |
64 SkGetPackedA32(c)); | 64 SkGetPackedA32(c)); |
65 } | 65 } |
66 | 66 |
67 //////////////////////////////////////////////////////////////////////////////// | 67 //////////////////////////////////////////////////////////////////////////////// |
68 /** Returns a texture representing the bitmap that is compatible with the GrText
ureParams. The | 68 /** Returns a texture representing the bitmap that is compatible with the GrText
ureParams. The |
69 texture is inserted into the cache (unless the bitmap is marked volatile) an
d can be | 69 texture is inserted into the cache (unless the bitmap is marked volatile) an
d can be |
70 retrieved again via this function. */ | 70 retrieved again via this function. */ |
71 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture
Params&); | 71 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture
Params&, |
| 72 SkSourceGammaTreatment); |
72 | 73 |
73 // TODO: Move SkImageInfo2GrPixelConfig to SkGrPriv.h (requires cleanup to SkWin
dow its subclasses). | 74 // TODO: Move SkImageInfo2GrPixelConfig to SkGrPriv.h (requires cleanup to SkWin
dow its subclasses). |
74 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, SkColorProfile
Type, const GrCaps&); | 75 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, SkColorProfile
Type, const GrCaps&); |
75 | 76 |
76 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info, c
onst GrCaps& caps) { | 77 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info, c
onst GrCaps& caps) { |
77 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType(), info.pr
ofileType(), caps); | 78 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType(), info.pr
ofileType(), caps); |
78 } | 79 } |
79 | 80 |
80 GrTextureParams::FilterMode GrSkFilterQualityToGrFilterMode(SkFilterQuality pain
tFilterQuality, | 81 GrTextureParams::FilterMode GrSkFilterQualityToGrFilterMode(SkFilterQuality pain
tFilterQuality, |
81 const SkMatrix& view
M, | 82 const SkMatrix& view
M, |
82 const SkMatrix& loca
lM, | 83 const SkMatrix& loca
lM, |
83 bool* doBicubic); | 84 bool* doBicubic); |
84 | 85 |
85 //////////////////////////////////////////////////////////////////////////////// | 86 //////////////////////////////////////////////////////////////////////////////// |
86 | 87 |
87 SkImageInfo GrMakeInfoFromTexture(GrTexture* tex, int w, int h, bool isOpaque); | 88 SkImageInfo GrMakeInfoFromTexture(GrTexture* tex, int w, int h, bool isOpaque); |
88 | 89 |
89 // Using the dreaded SkGrPixelRef ... | 90 // Using the dreaded SkGrPixelRef ... |
90 SK_API void GrWrapTextureInBitmap(GrTexture* src, int w, int h, bool isOpaque, | 91 SK_API void GrWrapTextureInBitmap(GrTexture* src, int w, int h, bool isOpaque, |
91 SkBitmap* dst); | 92 SkBitmap* dst); |
92 | 93 |
93 #endif | 94 #endif |
OLD | NEW |