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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 const void** outStartOfDataToUp
load); | 117 const void** outStartOfDataToUp
load); |
118 | 118 |
119 | 119 |
120 /** | 120 /** |
121 * Creates a new texture for the bitmap. Does not concern itself with cache keys
or texture params. | 121 * Creates a new texture for the bitmap. Does not concern itself with cache keys
or texture params. |
122 * The bitmap must have CPU-accessible pixels. Attempts to take advantage of fas
ter paths for | 122 * The bitmap must have CPU-accessible pixels. Attempts to take advantage of fas
ter paths for |
123 * compressed textures and yuv planes. | 123 * compressed textures and yuv planes. |
124 */ | 124 */ |
125 GrTexture* GrUploadBitmapToTexture(GrContext*, const SkBitmap&); | 125 GrTexture* GrUploadBitmapToTexture(GrContext*, const SkBitmap&); |
126 | 126 |
127 GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext*, const SkBitmap&); | 127 GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext*, const SkBitmap&, bool
gammaCorrect); |
128 | 128 |
129 /** | 129 /** |
130 * Creates a new texture for the pixmap. | 130 * Creates a new texture for the pixmap. |
131 */ | 131 */ |
132 GrTexture* GrUploadPixmapToTexture(GrContext*, const SkPixmap&, SkBudgeted budge
ted); | 132 GrTexture* GrUploadPixmapToTexture(GrContext*, const SkPixmap&, SkBudgeted budge
ted); |
133 | 133 |
134 /** | 134 /** |
135 * Creates a new texture populated with the mipmap levels. | 135 * Creates a new texture populated with the mipmap levels. |
136 */ | 136 */ |
137 GrTexture* GrUploadMipMapToTexture(GrContext*, const SkImageInfo&, const GrMipLe
vel* texels, | 137 GrTexture* GrUploadMipMapToTexture(GrContext*, const SkImageInfo&, const GrMipLe
vel* texels, |
138 int mipLevelCount); | 138 int mipLevelCount); |
139 | 139 |
140 ////////////////////////////////////////////////////////////////////////////// | 140 ////////////////////////////////////////////////////////////////////////////// |
141 | 141 |
142 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkXfermode::kZero_Coeff); | 142 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkXfermode::kZero_Coeff); |
143 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkXfermode::kOne_Coeff); | 143 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkXfermode::kOne_Coeff); |
144 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkXfermode::kSC_Coeff); | 144 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkXfermode::kSC_Coeff); |
145 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkXfermode::kISC_Coeff); | 145 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkXfermode::kISC_Coeff); |
146 GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkXfermode::kDC_Coeff); | 146 GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkXfermode::kDC_Coeff); |
147 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 147 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
148 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 148 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
149 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 149 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
150 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 150 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
151 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 151 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
152 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 152 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
153 | 153 |
154 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 154 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
155 | 155 |
156 #endif | 156 #endif |
OLD | NEW |