SkBitmap now *has* a SkPixmap.
Before:
class SkBitmap {
sk_sp<SkPixelRef> fPixelRef;
void* fPixels;
SkImageInfo fInfo;
uint32_t fRowBytes;
uint8_t fFlags;
};
After:
class SkBitmap {
sk_sp<SkPixelRef> fPixelRef;
SkPixmap fPixmap;
uint8_t fFlags;
};
Change-Id: I62d59ca3e702b7adea022cd3cfbf0cc3186af957
Reviewed-on: https://skia-review.googlesource.com/85560
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
diff --git a/src/core/SkPixmapPriv.h b/src/core/SkPixmapPriv.h
index 9941862..cced3e2 100644
--- a/src/core/SkPixmapPriv.h
+++ b/src/core/SkPixmapPriv.h
@@ -63,6 +63,11 @@
}
return true;
}
+
+ static void ResetPixmapKeepInfo(SkPixmap* pm, const void* address, size_t rowBytes) {
+ pm->fRowBytes = rowBytes;
+ pm->fPixels = address;
+ }
};
#endif