| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 bool SkPaintToGrPaintWithTexture(GrContext* context, | 93 bool SkPaintToGrPaintWithTexture(GrContext* context, |
| 94 const SkPaint& paint, | 94 const SkPaint& paint, |
| 95 const SkMatrix& viewM, | 95 const SkMatrix& viewM, |
| 96 sk_sp<GrFragmentProcessor> fp, | 96 sk_sp<GrFragmentProcessor> fp, |
| 97 bool textureIsAlphaOnly, | 97 bool textureIsAlphaOnly, |
| 98 bool allowSRGBInputs, | 98 bool allowSRGBInputs, |
| 99 GrPaint* grPaint); | 99 GrPaint* grPaint); |
| 100 | 100 |
| 101 ////////////////////////////////////////////////////////////////////////////// | 101 ////////////////////////////////////////////////////////////////////////////// |
| 102 | 102 |
| 103 // Using the dreaded SkGrPixelRef ... | |
| 104 void GrWrapTextureInBitmap(GrTexture* src, int w, int h, bool isOpaque, | |
| 105 SkBitmap* dst); | |
| 106 | |
| 107 | |
| 108 ////////////////////////////////////////////////////////////////////////////// | |
| 109 | |
| 110 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&, const GrCaps&); | 103 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&, const GrCaps&); |
| 111 | 104 |
| 112 bool GrPixelConfigToColorAndColorSpace(GrPixelConfig, SkColorType*, sk_sp<SkColo
rSpace>*); | 105 bool GrPixelConfigToColorAndColorSpace(GrPixelConfig, SkColorType*, sk_sp<SkColo
rSpace>*); |
| 113 | 106 |
| 114 /** | 107 /** |
| 115 * If the compressed data in the SkData is supported (as a texture format, this
returns | 108 * If the compressed data in the SkData is supported (as a texture format, this
returns |
| 116 * the pixel-config that should be used, and sets outStartOfDataToUpload to the
ptr into | 109 * the pixel-config that should be used, and sets outStartOfDataToUpload to the
ptr into |
| 117 * the data where the actual raw data starts (skipping any header bytes). | 110 * the data where the actual raw data starts (skipping any header bytes). |
| 118 * | 111 * |
| 119 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig
, and | 112 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig
, and |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 147 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
| 155 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 148 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
| 156 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 149 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
| 157 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 150 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
| 158 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 151 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
| 159 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 152 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
| 160 | 153 |
| 161 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 154 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
| 162 | 155 |
| 163 #endif | 156 #endif |
| OLD | NEW |