OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkGrPriv_DEFINED | 8 #ifndef SkGrPriv_DEFINED |
9 #define SkGrPriv_DEFINED | 9 #define SkGrPriv_DEFINED |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 sk_sp<GrFragmentProcessor> fp, | 98 sk_sp<GrFragmentProcessor> fp, |
99 bool textureIsAlphaOnly, | 99 bool textureIsAlphaOnly, |
100 GrPaint* grPaint); | 100 GrPaint* grPaint); |
101 | 101 |
102 ////////////////////////////////////////////////////////////////////////////// | 102 ////////////////////////////////////////////////////////////////////////////// |
103 | 103 |
104 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&, const GrCaps&); | 104 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&, const GrCaps&); |
105 | 105 |
106 bool GrPixelConfigToColorType(GrPixelConfig, SkColorType*); | 106 bool GrPixelConfigToColorType(GrPixelConfig, SkColorType*); |
107 | 107 |
108 /** When image filter code needs to construct a draw context to do intermediate rendering, we need | |
109 a renderable pixel config. The source (SkSpecialImage) may not be in a rende rable format, but | |
110 we want to preserve the color space of that source. This picks an appropriat e format to use. */ | |
robertphillips
2016/09/21 13:44:10
Should this take a const SkColorSpace* ?
| |
111 GrPixelConfig GrRenderableConfigForColorSpace(SkColorSpace*); | |
112 | |
108 /** | 113 /** |
109 * If the compressed data in the SkData is supported (as a texture format, this returns | 114 * If the compressed data in the SkData is supported (as a texture format, this returns |
110 * the pixel-config that should be used, and sets outStartOfDataToUpload to the ptr into | 115 * the pixel-config that should be used, and sets outStartOfDataToUpload to the ptr into |
111 * the data where the actual raw data starts (skipping any header bytes). | 116 * the data where the actual raw data starts (skipping any header bytes). |
112 * | 117 * |
113 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig , and | 118 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig , and |
114 * ignores outStartOfDataToUpload. | 119 * ignores outStartOfDataToUpload. |
115 */ | 120 */ |
116 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, | 121 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, |
117 int expectedW, int expectedH, | 122 int expectedW, int expectedH, |
(...skipping 30 matching lines...) Expand all Loading... | |
148 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 153 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
149 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 154 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
150 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 155 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
151 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 156 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
152 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 157 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
153 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 158 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
154 | 159 |
155 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 160 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
156 | 161 |
157 #endif | 162 #endif |
OLD | NEW |