Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 unsigned a = SkGetPackedA32(pm); | 61 unsigned a = SkGetPackedA32(pm); |
| 62 return GrColorPackRGBA(r, g, b, a); | 62 return GrColorPackRGBA(r, g, b, a); |
| 63 } | 63 } |
| 64 | 64 |
| 65 static inline GrColor SkColor2GrColorJustAlpha(SkColor c) { | 65 static inline GrColor SkColor2GrColorJustAlpha(SkColor c) { |
| 66 U8CPU a = SkColorGetA(c); | 66 U8CPU a = SkColorGetA(c); |
| 67 return GrColorPackRGBA(a, a, a, a); | 67 return GrColorPackRGBA(a, a, a, a); |
| 68 } | 68 } |
| 69 | 69 |
| 70 //////////////////////////////////////////////////////////////////////////////// | 70 //////////////////////////////////////////////////////////////////////////////// |
| 71 | 71 |
|
robertphillips
2015/09/08 13:34:35
// Returns 'kUnknown_GrPixelConfig' if 'data' does
reed1
2015/09/08 14:57:21
Done.
| |
| 72 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, | |
| 73 int expectedW, int expectedH, | |
| 74 const void** outStartOfDataToUp load); | |
| 75 | |
| 72 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* ); | 76 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* ); |
| 73 | 77 |
| 74 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*); | 78 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*); |
| 75 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageTyp e); | 79 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageTyp e); |
| 76 | 80 |
| 81 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey, GrSurfaceDesc, | |
| 82 SkPixelRef* pixelRefForInvalidationNotificat ionOrNull, | |
| 83 const void* pixels, size_t rowBytesOrZero); | |
| 84 | |
| 77 //////////////////////////////////////////////////////////////////////////////// | 85 //////////////////////////////////////////////////////////////////////////////// |
| 78 | 86 |
| 79 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. | 87 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. |
| 80 // Sets the color of GrPaint to the value of the parameter paintColor | 88 // Sets the color of GrPaint to the value of the parameter paintColor |
| 81 // Callers may subsequently modify the GrPaint. Setting constantColor indicates | 89 // Callers may subsequently modify the GrPaint. Setting constantColor indicates |
| 82 // that the final paint will draw the same color at every pixel. This allows | 90 // that the final paint will draw the same color at every pixel. This allows |
| 83 // an optimization where the color filter can be applied to the SkPaint's | 91 // an optimization where the color filter can be applied to the SkPaint's |
| 84 // color once while converting to GrPaint and then ignored. TODO: Remove this | 92 // color once while converting to GrPaint and then ignored. TODO: Remove this |
| 85 // bool and use the invariant info to automatically apply the color filter. | 93 // bool and use the invariant info to automatically apply the color filter. |
| 86 bool SkPaint2GrPaintNoShader(GrContext* context, GrRenderTarget*, const SkPaint& skPaint, | 94 bool SkPaint2GrPaintNoShader(GrContext* context, GrRenderTarget*, const SkPaint& skPaint, |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 104 bool* doBicubic); | 112 bool* doBicubic); |
| 105 | 113 |
| 106 //////////////////////////////////////////////////////////////////////////////// | 114 //////////////////////////////////////////////////////////////////////////////// |
| 107 // Classes | 115 // Classes |
| 108 | 116 |
| 109 class SkGlyphCache; | 117 class SkGlyphCache; |
| 110 | 118 |
| 111 //////////////////////////////////////////////////////////////////////////////// | 119 //////////////////////////////////////////////////////////////////////////////// |
| 112 | 120 |
| 113 #endif | 121 #endif |
| OLD | NEW |