| 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 |
| 11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
| 12 #include "GrBlend.h" | 12 #include "GrBlend.h" |
| 13 #include "SkEncodedFormat.h" |
| 13 #include "SkImageInfo.h" | 14 #include "SkImageInfo.h" |
| 14 #include "SkMatrix.h" | 15 #include "SkMatrix.h" |
| 15 #include "SkXfermode.h" | 16 #include "SkXfermode.h" |
| 16 | 17 |
| 17 class GrCaps; | 18 class GrCaps; |
| 18 class GrContext; | 19 class GrContext; |
| 19 class GrFragmentProcessor; | 20 class GrFragmentProcessor; |
| 20 class GrPaint; | 21 class GrPaint; |
| 21 class GrTexture; | 22 class GrTexture; |
| 22 class GrTextureParams; | 23 class GrTextureParams; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 bool allowSRGBInputs, | 99 bool allowSRGBInputs, |
| 99 GrPaint* grPaint); | 100 GrPaint* grPaint); |
| 100 | 101 |
| 101 ////////////////////////////////////////////////////////////////////////////// | 102 ////////////////////////////////////////////////////////////////////////////// |
| 102 | 103 |
| 103 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&, const GrCaps&); | 104 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&, const GrCaps&); |
| 104 | 105 |
| 105 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig, SkColorType*, SkColorProfi
leType*); | 106 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig, SkColorType*, SkColorProfi
leType*); |
| 106 | 107 |
| 107 /** | 108 /** |
| 109 * Returns true if the specified encoded format might be supported on this GPU. |
| 110 */ |
| 111 bool GrIsCompressedFormatPossiblySupported(GrContext*, SkEncodedFormat); |
| 112 |
| 113 /** |
| 108 * 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 |
| 109 * 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 |
| 110 * 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). |
| 111 * | 117 * |
| 112 * 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 |
| 113 * ignores outStartOfDataToUpload. | 119 * ignores outStartOfDataToUpload. |
| 114 */ | 120 */ |
| 115 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, | 121 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, |
| 116 int expectedW, int expectedH, | 122 int expectedW, int expectedH, |
| 117 const void** outStartOfDataToUp
load); | 123 const void** outStartOfDataToUp
load); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 141 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 147 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
| 142 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 148 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
| 143 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 149 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
| 144 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 150 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
| 145 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 151 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
| 146 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 152 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
| 147 | 153 |
| 148 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 154 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
| 149 | 155 |
| 150 #endif | 156 #endif |
| OLD | NEW |