screenshot: Fix notification
St.ImageContent.set_bytes() now has an additional Cogl.Context
parameter.
Fixes: 44b84e458a
("st/image-content: Take a CoglContext on set_bytes/set_data functions")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8190
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3631>
This commit is contained in:

committed by
Marge Bot

parent
3726161bfd
commit
4f5cd433b2
@@ -2308,10 +2308,12 @@ function _storeScreenshot(bytes, pixbuf) {
|
|||||||
// Create a St.ImageContent icon for the notification. We want
|
// Create a St.ImageContent icon for the notification. We want
|
||||||
// St.ImageContent specifically because it preserves the aspect ratio when
|
// St.ImageContent specifically because it preserves the aspect ratio when
|
||||||
// shown in a notification.
|
// shown in a notification.
|
||||||
|
const coglContext = global.stage.context.get_backend().get_cogl_context();
|
||||||
const pixels = pixbuf.read_pixel_bytes();
|
const pixels = pixbuf.read_pixel_bytes();
|
||||||
const content =
|
const content =
|
||||||
St.ImageContent.new_with_preferred_size(pixbuf.width, pixbuf.height);
|
St.ImageContent.new_with_preferred_size(pixbuf.width, pixbuf.height);
|
||||||
content.set_bytes(
|
content.set_bytes(
|
||||||
|
coglContext,
|
||||||
pixels,
|
pixels,
|
||||||
Cogl.PixelFormat.RGBA_8888,
|
Cogl.PixelFormat.RGBA_8888,
|
||||||
pixbuf.width,
|
pixbuf.width,
|
||||||
|
Reference in New Issue
Block a user