| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 ComputeRowBytes() is called to compute the optimal value. This resets | 269 ComputeRowBytes() is called to compute the optimal value. This resets |
| 270 any pixel/colortable ownership, just like reset(). | 270 any pixel/colortable ownership, just like reset(). |
| 271 */ | 271 */ |
| 272 bool setConfig(Config, int width, int height, size_t rowBytes, SkAlphaType); | 272 bool setConfig(Config, int width, int height, size_t rowBytes, SkAlphaType); |
| 273 | 273 |
| 274 bool setConfig(Config config, int width, int height, size_t rowBytes = 0) { | 274 bool setConfig(Config config, int width, int height, size_t rowBytes = 0) { |
| 275 return this->setConfig(config, width, height, rowBytes, | 275 return this->setConfig(config, width, height, rowBytes, |
| 276 kPremul_SkAlphaType); | 276 kPremul_SkAlphaType); |
| 277 } | 277 } |
| 278 | 278 |
| 279 bool setInfo(const SkImageInfo&, size_t rowBytes = 0); | 279 bool setConfig(const SkImageInfo& info, size_t rowBytes = 0); |
| 280 | |
| 281 #ifdef SK_SUPPORT_LEGACY_SETCONFIG_INFO | |
| 282 bool setConfig(const SkImageInfo& info, size_t rowBytes = 0) { | |
| 283 return this->setInfo(info, rowBytes); | |
| 284 } | |
| 285 #endif | |
| 286 | 280 |
| 287 /** | 281 /** |
| 288 * Allocate a pixelref to match the specified image info. If the Factory | 282 * Allocate a pixelref to match the specified image info. If the Factory |
| 289 * is non-null, call it to allcoate the pixelref. If the ImageInfo requires | 283 * is non-null, call it to allcoate the pixelref. If the ImageInfo requires |
| 290 * a colortable, then ColorTable must be non-null, and will be ref'd. | 284 * a colortable, then ColorTable must be non-null, and will be ref'd. |
| 291 * On failure, the bitmap will be set to empty and return false. | 285 * On failure, the bitmap will be set to empty and return false. |
| 292 */ | 286 */ |
| 293 bool allocPixels(const SkImageInfo&, SkPixelRefFactory*, SkColorTable*); | 287 bool allocPixels(const SkImageInfo&, SkPixelRefFactory*, SkColorTable*); |
| 294 | 288 |
| 295 /** | 289 /** |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 } | 906 } |
| 913 | 907 |
| 914 /////////////////////////////////////////////////////////////////////////////// | 908 /////////////////////////////////////////////////////////////////////////////// |
| 915 // | 909 // |
| 916 // Helpers until we can fully deprecate SkBitmap::Config | 910 // Helpers until we can fully deprecate SkBitmap::Config |
| 917 // | 911 // |
| 918 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); | 912 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); |
| 919 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); | 913 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); |
| 920 | 914 |
| 921 #endif | 915 #endif |
| OLD | NEW |