LibWeb: Mark bitmaps passed to Skia as immutable
All bitmaps passed to Skia during rendering are not supposed to be mutated.
This commit is contained in:
parent
31eec0a145
commit
af9b91e0f7
Notes:
sideshowbarker
2024-07-16 23:05:02 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/af9b91e0f7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/640
1 changed files with 3 additions and 1 deletions
|
@ -320,10 +320,12 @@ static SkBitmap to_skia_bitmap(Gfx::Bitmap const& bitmap)
|
|||
SkBitmap sk_bitmap;
|
||||
sk_bitmap.setInfo(image_info);
|
||||
|
||||
if (!sk_bitmap.installPixels(image_info, (void*)bitmap.begin(), bitmap.width() * 4)) {
|
||||
if (!sk_bitmap.installPixels(image_info, const_cast<Gfx::ARGB32*>(bitmap.begin()), bitmap.width() * 4)) {
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
sk_bitmap.setImmutable();
|
||||
|
||||
return sk_bitmap;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue