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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 dimensions is empty, or if there is an unsupported config, false will be | 614 dimensions is empty, or if there is an unsupported config, false will be |
615 returned and dst will be untouched. | 615 returned and dst will be untouched. |
616 @param dst The bitmap that will be set to a subset of this bitmap | 616 @param dst The bitmap that will be set to a subset of this bitmap |
617 @param subset The rectangle of pixels in this bitmap that dst will | 617 @param subset The rectangle of pixels in this bitmap that dst will |
618 reference. | 618 reference. |
619 @return true if the subset copy was successfully made. | 619 @return true if the subset copy was successfully made. |
620 */ | 620 */ |
621 bool extractSubset(SkBitmap* dst, const SkIRect& subset) const; | 621 bool extractSubset(SkBitmap* dst, const SkIRect& subset) const; |
622 | 622 |
623 #ifdef SK_SUPPORT_LEGACY_COPYTO_CONFIG | 623 #ifdef SK_SUPPORT_LEGACY_COPYTO_CONFIG |
624 bool copyTo(SkBitmap* dst, Config c, Allocator* allocator) const; | 624 bool copyTo(SkBitmap* dst, Config c, Allocator* allocator = NULL) const; |
625 bool canCopyTo(Config newConfig) const; | 625 bool canCopyTo(Config newConfig) const; |
626 #endif | 626 #endif |
627 /** Makes a deep copy of this bitmap, respecting the requested colorType, | 627 /** Makes a deep copy of this bitmap, respecting the requested colorType, |
628 * and allocating the dst pixels on the cpu. | 628 * and allocating the dst pixels on the cpu. |
629 * Returns false if either there is an error (i.e. the src does not have | 629 * Returns false if either there is an error (i.e. the src does not have |
630 * pixels) or the request cannot be satisfied (e.g. the src has per-pixel | 630 * pixels) or the request cannot be satisfied (e.g. the src has per-pixel |
631 * alpha, and the requested config does not support alpha). | 631 * alpha, and the requested config does not support alpha). |
632 * @param dst The bitmap to be sized and allocated | 632 * @param dst The bitmap to be sized and allocated |
633 * @param ct The desired colorType for dst | 633 * @param ct The desired colorType for dst |
634 * @param allocator Allocator used to allocate the pixelref for the dst | 634 * @param allocator Allocator used to allocate the pixelref for the dst |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 } | 940 } |
941 | 941 |
942 /////////////////////////////////////////////////////////////////////////////// | 942 /////////////////////////////////////////////////////////////////////////////// |
943 // | 943 // |
944 // Helpers until we can fully deprecate SkBitmap::Config | 944 // Helpers until we can fully deprecate SkBitmap::Config |
945 // | 945 // |
946 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); | 946 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); |
947 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); | 947 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); |
948 | 948 |
949 #endif | 949 #endif |
OLD | NEW |