[gnome-games] savestate-listbox-row: Stop using Gdk.cairo_surface_create_from_pixbuf()



commit 212178e067b0e88dad63075f078b71e0cacf6a37
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Mon Aug 19 20:52:47 2019 +0500

    savestate-listbox-row: Stop using Gdk.cairo_surface_create_from_pixbuf()
    
    Use Gtk.cairo_set_source_pixbuf() instead.

 src/ui/savestate-listbox-row.vala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/ui/savestate-listbox-row.vala b/src/ui/savestate-listbox-row.vala
index 2c6822d0..56b17414 100644
--- a/src/ui/savestate-listbox-row.vala
+++ b/src/ui/savestate-listbox-row.vala
@@ -120,11 +120,10 @@ private class Games.SavestateListBoxRow : Gtk.ListBoxRow {
 
                var mask = get_mask ();
 
-               var surface = Gdk.cairo_surface_create_from_pixbuf (pixbuf, 1, image.get_window ());
                var x_offset = (width * scale_factor - pixbuf.width) / 2;
                var y_offset = (height * scale_factor - pixbuf.height) / 2;
 
-               cr.set_source_surface (surface, x_offset, y_offset);
+               Gdk.cairo_set_source_pixbuf (cr, pixbuf, x_offset, y_offset);
 
                cr.mask_surface (mask, 0, 0);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]