| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 SkBitmap_DEFINED | 8 #ifndef SkBitmap_DEFINED |
| 9 #define SkBitmap_DEFINED | 9 #define SkBitmap_DEFINED |
| 10 | 10 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 /** | 318 /** |
| 319 * Install a pixelref that wraps the specified pixels and rowBytes, and | 319 * Install a pixelref that wraps the specified pixels and rowBytes, and |
| 320 * optional ReleaseProc and context. When the pixels are no longer | 320 * optional ReleaseProc and context. When the pixels are no longer |
| 321 * referenced, if releaseProc is not null, it will be called with the | 321 * referenced, if releaseProc is not null, it will be called with the |
| 322 * pixels and context as parameters. | 322 * pixels and context as parameters. |
| 323 * On failure, the bitmap will be set to empty and return false. | 323 * On failure, the bitmap will be set to empty and return false. |
| 324 */ | 324 */ |
| 325 bool installPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkColo
rTable*, | 325 bool installPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkColo
rTable*, |
| 326 void (*releaseProc)(void* addr, void* context), void* con
text); | 326 void (*releaseProc)(void* addr, void* context), void* con
text); |
| 327 | 327 |
| 328 #ifdef SK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS | |
| 329 bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, | |
| 330 void (*releaseProc)(void* addr, void* context), | |
| 331 void* context) { | |
| 332 return this->installPixels(info, pixels, rowBytes, NULL, releaseProc, co
ntext); | |
| 333 } | |
| 334 #endif | |
| 335 | |
| 336 /** | 328 /** |
| 337 * Call installPixels with no ReleaseProc specified. This means that the | 329 * Call installPixels with no ReleaseProc specified. This means that the |
| 338 * caller must ensure that the specified pixels are valid for the lifetime | 330 * caller must ensure that the specified pixels are valid for the lifetime |
| 339 * of the created bitmap (and its pixelRef). | 331 * of the created bitmap (and its pixelRef). |
| 340 */ | 332 */ |
| 341 bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) { | 333 bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) { |
| 342 return this->installPixels(info, pixels, rowBytes, NULL, NULL, NULL); | 334 return this->installPixels(info, pixels, rowBytes, NULL, NULL, NULL); |
| 343 } | 335 } |
| 344 | 336 |
| 345 /** | 337 /** |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 #ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG | 892 #ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG |
| 901 /////////////////////////////////////////////////////////////////////////////// | 893 /////////////////////////////////////////////////////////////////////////////// |
| 902 // | 894 // |
| 903 // Helpers until we can fully deprecate SkBitmap::Config | 895 // Helpers until we can fully deprecate SkBitmap::Config |
| 904 // | 896 // |
| 905 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); | 897 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); |
| 906 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); | 898 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); |
| 907 #endif | 899 #endif |
| 908 | 900 |
| 909 #endif | 901 #endif |
| OLD | NEW |