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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 * the pixel-config that should be used, and sets outStartOfDataToUpload to the
ptr into | 74 * the pixel-config that should be used, and sets outStartOfDataToUpload to the
ptr into |
75 * the data where the actual raw data starts (skipping any header bytes). | 75 * the data where the actual raw data starts (skipping any header bytes). |
76 * | 76 * |
77 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig
, and | 77 * If the compressed data is not supported, this returns kUnknown_GrPixelConfig
, and |
78 * ignores outStartOfDataToUpload. | 78 * ignores outStartOfDataToUpload. |
79 */ | 79 */ |
80 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, | 80 GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data, |
81 int expectedW, int expectedH, | 81 int expectedW, int expectedH, |
82 const void** outStartOfDataToUp
load); | 82 const void** outStartOfDataToUp
load); |
83 | 83 |
| 84 // Helper that calls GrIsImageInCache assuming bitmap is not volatile. |
84 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*
); | 85 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*
); |
| 86 bool GrIsImageInCache(const GrContext* ctx, uint32_t imageID, const SkIRect& sub
set, |
| 87 GrTexture* nativeTexture, const GrTextureParams*); |
85 | 88 |
86 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture
Params*); | 89 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture
Params*); |
87 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageTyp
e); | 90 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageTyp
e); |
88 | 91 |
89 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey,
GrSurfaceDesc, | 92 GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey,
GrSurfaceDesc, |
90 SkPixelRef* pixelRefForInvalidationNotificat
ionOrNull, | 93 SkPixelRef* pixelRefForInvalidationNotificat
ionOrNull, |
91 const void* pixels, size_t rowBytesOrZero); | 94 const void* pixels, size_t rowBytesOrZero); |
92 | 95 |
93 //////////////////////////////////////////////////////////////////////////////// | 96 //////////////////////////////////////////////////////////////////////////////// |
94 | 97 |
(...skipping 26 matching lines...) Expand all Loading... |
121 bool* doBicubic); | 124 bool* doBicubic); |
122 | 125 |
123 //////////////////////////////////////////////////////////////////////////////// | 126 //////////////////////////////////////////////////////////////////////////////// |
124 // Classes | 127 // Classes |
125 | 128 |
126 class SkGlyphCache; | 129 class SkGlyphCache; |
127 | 130 |
128 //////////////////////////////////////////////////////////////////////////////// | 131 //////////////////////////////////////////////////////////////////////////////// |
129 | 132 |
130 #endif | 133 #endif |
OLD | NEW |