- most notably in the now-removed copyTo method
SK_C_API bool sk_bitmap_extract_subset(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, sk_irect_t* subset);
SK_C_API bool sk_bitmap_extract_alpha(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, const sk_paint_t* paint, sk_ipoint_t* offset);
SK_C_API void sk_bitmap_notify_pixels_changed(sk_bitmap_t* cbitmap);
+SK_C_API void sk_bitmap_swap(sk_bitmap_t* cbitmap, sk_bitmap_t* cother);
SK_C_PLUS_PLUS_END_GUARD
{
AsBitmap(cbitmap)->notifyPixelsChanged();
}
+
+void sk_bitmap_swap(sk_bitmap_t* cbitmap, sk_bitmap_t* cother)
+{
+ AsBitmap(cbitmap)->swap(AsBitmap(*cother));
+}
return reinterpret_cast<SkBitmap*>(cbitmap);
}
+static inline SkBitmap& AsBitmap(sk_bitmap_t& cbitmap) {
+ return reinterpret_cast<SkBitmap&>(cbitmap);
+}
+
static inline const SkPixmap* AsPixmap(const sk_pixmap_t* cpixmap) {
return reinterpret_cast<const SkPixmap*>(cpixmap);
}