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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 * the pixel-config that should be used, and sets outStartOfDataToUpload to the
ptr into | 107 * the pixel-config that should be used, and sets outStartOfDataToUpload to the
ptr into |
108 * the data where the actual raw data starts (skipping any header bytes). | 108 * the data where the actual raw data starts (skipping any header bytes). |
109 * | 109 * |
110 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig,
and | 110 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig,
and |
111 * ignores outStartOfDataToUpload. | 111 * ignores outStartOfDataToUpload. |
112 */ | 112 */ |
113 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, | 113 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, |
114 int expectedW, int expectedH, | 114 int expectedW, int expectedH, |
115 const void** outStartOfDataToUp
load); | 115 const void** outStartOfDataToUp
load); |
116 | 116 |
117 bool GrIsImageInCache(const GrContext* ctx, uint32_t imageID, const SkIRect& sub
set, | |
118 GrTexture* nativeTexture, const GrTextureParams&); | |
119 | |
120 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey,
GrSurfaceDesc, | 117 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey,
GrSurfaceDesc, |
121 SkPixelRef* pixelRefForInvalidationNotificat
ionOrNull, | 118 SkPixelRef* pixelRefForInvalidationNotificat
ionOrNull, |
122 const void* pixels, size_t rowBytesOrZero); | 119 const void* pixels, size_t rowBytesOrZero); |
123 | 120 |
124 | 121 |
125 ////////////////////////////////////////////////////////////////////////////// | 122 ////////////////////////////////////////////////////////////////////////////// |
126 | 123 |
127 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkXfermode::kZero_Coeff); | 124 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkXfermode::kZero_Coeff); |
128 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkXfermode::kOne_Coeff); | 125 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkXfermode::kOne_Coeff); |
129 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkXfermode::kSC_Coeff); | 126 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkXfermode::kSC_Coeff); |
130 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkXfermode::kISC_Coeff); | 127 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkXfermode::kISC_Coeff); |
131 GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkXfermode::kDC_Coeff); | 128 GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkXfermode::kDC_Coeff); |
132 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 129 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
133 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); | 130 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); |
134 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); | 131 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); |
135 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); | 132 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); |
136 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); | 133 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); |
137 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); | 134 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
138 | 135 |
139 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) | 136 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) |
140 | 137 |
141 #endif | 138 #endif |
OLD | NEW |