🔥 Remove deprecated use of Clutter.Image
This commit is contained in:
@@ -20,7 +20,7 @@ import * as utils from '../utils.js';
|
||||
// preferences process. They are used only in the creator function of the ShaderFactory
|
||||
// which is only called within GNOME Shell's process.
|
||||
const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
|
||||
const Clutter = await utils.importInShellOnly('gi://Clutter');
|
||||
const St = await utils.importInShellOnly('gi://St');
|
||||
const GdkPixbuf = await utils.importInShellOnly('gi://GdkPixbuf');
|
||||
const Cogl = await utils.importInShellOnly('gi://Cogl');
|
||||
|
||||
@@ -50,7 +50,7 @@ export default class Effect {
|
||||
// Create the texture in the first call.
|
||||
if (!this._dustTexture) {
|
||||
const dustData = GdkPixbuf.Pixbuf.new_from_resource('/img/dust.png');
|
||||
this._dustTexture = new Clutter.Image();
|
||||
this._dustTexture = new St.ImageContent();
|
||||
this._dustTexture.set_data(dustData.get_pixels(), Cogl.PixelFormat.RGB_888,
|
||||
dustData.width, dustData.height, dustData.rowstride);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user