| 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 |
| 11 #ifndef SkGr_DEFINED | 11 #ifndef SkGr_DEFINED |
| 12 #define SkGr_DEFINED | 12 #define SkGr_DEFINED |
| 13 | 13 |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 | 15 |
| 16 // Gr headers | 16 // Gr headers |
| 17 #include "GrContext.h" | 17 #include "GrContext.h" |
| 18 #include "GrTextureAccess.h" | 18 #include "GrTextureAccess.h" |
| 19 #include "GrTypes.h" | 19 #include "GrTypes.h" |
| 20 | 20 |
| 21 // skia headers | 21 // skia headers |
| 22 #include "SkBitmap.h" | 22 #include "SkBitmap.h" |
| 23 #include "SkClipStack.h" |
| 24 #include "SkMipMapLevel.h" |
| 23 #include "SkPath.h" | 25 #include "SkPath.h" |
| 24 #include "SkPoint.h" | 26 #include "SkPoint.h" |
| 25 #include "SkRegion.h" | 27 #include "SkRegion.h" |
| 26 #include "SkClipStack.h" | |
| 27 | 28 |
| 28 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
| 29 // Sk to Gr Type conversions | 30 // Sk to Gr Type conversions |
| 30 | 31 |
| 31 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkXfermode::kZero_Coeff); | 32 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkXfermode::kZero_Coeff); |
| 32 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkXfermode::kOne_Coeff); | 33 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkXfermode::kOne_Coeff); |
| 33 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkXfermode::kSC_Coeff); | 34 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkXfermode::kSC_Coeff); |
| 34 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkXfermode::kISC_Coeff); | 35 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkXfermode::kISC_Coeff); |
| 35 GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkXfermode::kDC_Coeff); | 36 GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkXfermode::kDC_Coeff); |
| 36 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); | 37 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 const void** outStartOfDataToUp
load); | 83 const void** outStartOfDataToUp
load); |
| 83 | 84 |
| 84 // Helper that calls GrIsImageInCache assuming bitmap is not volatile. | 85 // Helper that calls GrIsImageInCache assuming bitmap is not volatile. |
| 85 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*
); | 86 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*
); |
| 86 bool GrIsImageInCache(const GrContext* ctx, uint32_t imageID, const SkIRect& sub
set, | 87 bool GrIsImageInCache(const GrContext* ctx, uint32_t imageID, const SkIRect& sub
set, |
| 87 GrTexture* nativeTexture, const GrTextureParams*); | 88 GrTexture* nativeTexture, const GrTextureParams*); |
| 88 | 89 |
| 89 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture
Params*); | 90 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture
Params*); |
| 90 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageTyp
e); | 91 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageTyp
e); |
| 91 | 92 |
| 93 GrTexture* GrMipMapTexture(GrContext&, const SkBitmap&, SkDiscardableFactoryProc
); |
| 94 |
| 92 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey,
GrSurfaceDesc, | 95 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey,
GrSurfaceDesc, |
| 93 SkPixelRef* pixelRefForInvalidationNotificat
ionOrNull, | 96 SkPixelRef* pixelRefForInvalidationNotificat
ionOrNull, |
| 94 const void* pixels, size_t rowBytesOrZero); | 97 const void* pixels, size_t rowBytesOrZero); |
| 95 | 98 |
| 96 //////////////////////////////////////////////////////////////////////////////// | 99 //////////////////////////////////////////////////////////////////////////////// |
| 97 | 100 |
| 98 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. | 101 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. |
| 99 // Sets the color of GrPaint to the value of the parameter paintColor | 102 // Sets the color of GrPaint to the value of the parameter paintColor |
| 100 // Callers may subsequently modify the GrPaint. Setting constantColor indicates | 103 // Callers may subsequently modify the GrPaint. Setting constantColor indicates |
| 101 // that the final paint will draw the same color at every pixel. This allows | 104 // that the final paint will draw the same color at every pixel. This allows |
| (...skipping 22 matching lines...) Expand all Loading... |
| 124 bool* doBicubic); | 127 bool* doBicubic); |
| 125 | 128 |
| 126 //////////////////////////////////////////////////////////////////////////////// | 129 //////////////////////////////////////////////////////////////////////////////// |
| 127 // Classes | 130 // Classes |
| 128 | 131 |
| 129 class SkGlyphCache; | 132 class SkGlyphCache; |
| 130 | 133 |
| 131 //////////////////////////////////////////////////////////////////////////////// | 134 //////////////////////////////////////////////////////////////////////////////// |
| 132 | 135 |
| 133 #endif | 136 #endif |
| OLD | NEW |