| 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 19 matching lines...) Expand all Loading... |
| 30 * Our key includes the offset, width, and height so that bitmaps created by ex
tractSubset() | 30 * Our key includes the offset, width, and height so that bitmaps created by ex
tractSubset() |
| 31 * are unique. | 31 * are unique. |
| 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, |
| 41 bool isMipMapped); |
| 42 |
| 43 /** |
| 44 * This function is a shim which calls the other GrMakeKeyFromImageID with |
| 45 * isMipMapped = false |
| 46 */ |
| 40 void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
geBounds); | 47 void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
geBounds); |
| 41 | 48 |
| 42 /** Converts an SkPaint to a GrPaint for a given GrContext. The matrix is requir
ed in order | 49 /** 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. */ | 50 to convert the SkShader (if any) on the SkPaint. The primitive itself has no
color. */ |
| 44 bool SkPaintToGrPaint(GrContext*, | 51 bool SkPaintToGrPaint(GrContext*, |
| 45 const SkPaint& skPaint, | 52 const SkPaint& skPaint, |
| 46 const SkMatrix& viewM, | 53 const SkMatrix& viewM, |
| 47 GrPaint* grPaint); | 54 GrPaint* grPaint); |
| 48 | 55 |
| 49 /** Same as above but ignores the SkShader (if any) on skPaint. */ | 56 /** Same as above but ignores the SkShader (if any) on skPaint. */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 123 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
| 117 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 124 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
| 118 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 125 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
| 119 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 126 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
| 120 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 127 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
| 121 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 128 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
| 122 | 129 |
| 123 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 130 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
| 124 | 131 |
| 125 #endif | 132 #endif |
| OLD | NEW |