Fix St.ImageContent.set_bytes missing Cogl.Context argument
set_bytes() takes a Cogl.Context as its first parameter (added upstream in GNOME Shell 48, see js/ui/screenshot.js); omitting it produced "At least 6 arguments required, but only 5 passed" for every frame, which fell through to the equally non-functional Clutter.Image fallback and left the live wallpaper blank.
This commit is contained in:
@@ -15,13 +15,19 @@ import {loadGstreamerModules, GSTREAMER_INSTALL_HINT} from './gstreamerAvailabil
|
|||||||
* mechanism gnome-shell's own code uses for uploading raw pixel buffers —
|
* mechanism gnome-shell's own code uses for uploading raw pixel buffers —
|
||||||
* is tried first, with the legacy Clutter.Image/set_data path kept only as
|
* is tried first, with the legacy Clutter.Image/set_data path kept only as
|
||||||
* a fallback for older shells.
|
* a fallback for older shells.
|
||||||
|
*
|
||||||
|
* St.ImageContent.set_bytes() takes a Cogl.Context as its first argument
|
||||||
|
* (see js/ui/screenshot.js upstream) — omitting it is what produced
|
||||||
|
* "At least 6 arguments required, but only 5 passed".
|
||||||
*/
|
*/
|
||||||
const FRAME_IMAGE_STRATEGIES = [
|
const FRAME_IMAGE_STRATEGIES = [
|
||||||
{
|
{
|
||||||
name: 'St.ImageContent',
|
name: 'St.ImageContent',
|
||||||
create: (width, height) => St.ImageContent.new_with_preferred_size(width, height),
|
create: (width, height) => St.ImageContent.new_with_preferred_size(width, height),
|
||||||
upload: (image, Cogl, data, width, height) =>
|
upload: (image, Cogl, data, width, height) =>
|
||||||
image.set_bytes(GLib.Bytes.new(data), Cogl.PixelFormat.RGBA_8888, width, height, width * 4),
|
image.set_bytes(
|
||||||
|
global.stage.context.get_backend().get_cogl_context(),
|
||||||
|
GLib.Bytes.new(data), Cogl.PixelFormat.RGBA_8888, width, height, width * 4),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Clutter.Image',
|
name: 'Clutter.Image',
|
||||||
|
|||||||
Reference in New Issue
Block a user