| 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 21 matching lines...) Expand all Loading... |
| 32 * | 32 * |
| 33 * The imageID is in the shared namespace (see SkNextID::ImageID()) | 33 * The imageID is in the shared namespace (see SkNextID::ImageID()) |
| 34 * - SkBitmap/SkPixelRef | 34 * - SkBitmap/SkPixelRef |
| 35 * - SkImage | 35 * - SkImage |
| 36 * - SkImageGenerator | 36 * - SkImageGenerator |
| 37 * | 37 * |
| 38 * Note: width/height must fit in 16bits for this impl. | 38 * Note: width/height must fit in 16bits for this impl. |
| 39 */ | 39 */ |
| 40 void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
geBounds); | 40 void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
geBounds); |
| 41 | 41 |
| 42 /** Call this after installing a GrUniqueKey on texture. It will cause the textu
re's key to be |
| 43 removed should the bitmap's contents change or be destroyed. */ |
| 44 void GrInstallBitmapUniqueKeyInvalidator(const GrUniqueKey& key, SkPixelRef* pix
elRef); |
| 45 |
| 42 /** Converts an SkPaint to a GrPaint for a given GrContext. The matrix is requir
ed in order | 46 /** Converts an SkPaint to a GrPaint for a given GrContext. The matrix is requir
ed in order |
| 43 to convert the SkShader (if any) on the SkPaint. The primitive itself has no
color. */ | 47 to convert the SkShader (if any) on the SkPaint. The primitive itself has no
color. */ |
| 44 bool SkPaintToGrPaint(GrContext*, | 48 bool SkPaintToGrPaint(GrContext*, |
| 45 const SkPaint& skPaint, | 49 const SkPaint& skPaint, |
| 46 const SkMatrix& viewM, | 50 const SkMatrix& viewM, |
| 47 GrPaint* grPaint); | 51 GrPaint* grPaint); |
| 48 | 52 |
| 49 /** Same as above but ignores the SkShader (if any) on skPaint. */ | 53 /** Same as above but ignores the SkShader (if any) on skPaint. */ |
| 50 bool SkPaintToGrPaintNoShader(GrContext* context, | 54 bool SkPaintToGrPaintNoShader(GrContext* context, |
| 51 const SkPaint& skPaint, | 55 const SkPaint& skPaint, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 120 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
| 117 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 121 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
| 118 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 122 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
| 119 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 123 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
| 120 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 124 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
| 121 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 125 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
| 122 | 126 |
| 123 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 127 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
| 124 | 128 |
| 125 #endif | 129 #endif |
| OLD | NEW |