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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 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 | 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. */ | 110 we want to preserve the color space of that source. This picks an appropriat
e format to use. */ |
111 GrPixelConfig GrRenderableConfigForColorSpace(SkColorSpace*); | 111 GrPixelConfig GrRenderableConfigForColorSpace(const SkColorSpace*); |
112 | 112 |
113 /** | 113 /** |
114 * 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 |
115 * 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 |
116 * 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). |
117 * | 117 * |
118 * 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 |
119 * ignores outStartOfDataToUpload. | 119 * ignores outStartOfDataToUpload. |
120 */ | 120 */ |
121 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, | 121 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 153 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
154 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 154 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
155 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 155 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
156 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 156 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
157 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 157 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
158 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 158 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
159 | 159 |
160 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 160 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
161 | 161 |
162 #endif | 162 #endif |
OLD | NEW |