Changeset 122233 in webkit


Ignore:
Timestamp:
Jul 10, 2012 10:05:24 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Fix memory leaks by adopting allocation of GdkPixbuf
https://bugs.webkit.org/show_bug.cgi?id=90790

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-07-10
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Fixed a memory leak in paintGdkPixbuf by adopting an allocation
of GdkPixbuf.

No new tests. No change in behavior.

  • platform/gtk/RenderThemeGtk.cpp:

(WebCore::paintGdkPixbuf):

Source/WebKit/gtk:

Fixed a memory leak in WebKitFaviconDatabase by adopting an
allocation of GdkPixbuf.

  • webkit/webkitfavicondatabase.cpp:

(getIconPixbufSynchronously):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r122232 r122233  
     12012-07-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
     2
     3        [GTK] Fix memory leaks by adopting allocation of GdkPixbuf
     4        https://bugs.webkit.org/show_bug.cgi?id=90790
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Fixed a memory leak in paintGdkPixbuf by adopting an allocation
     9        of GdkPixbuf.
     10
     11        No new tests. No change in behavior.
     12
     13        * platform/gtk/RenderThemeGtk.cpp:
     14        (WebCore::paintGdkPixbuf):
     15
    1162012-07-10  Konrad Piascik  <kpiascik@rim.com>
    217
  • trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp

    r115852 r122233  
    239239{
    240240    IntSize iconSize(gdk_pixbuf_get_width(icon), gdk_pixbuf_get_height(icon));
     241    GRefPtr<GdkPixbuf> scaledIcon;
    241242    if (iconRect.size() != iconSize) {
    242243        // We could use cairo_scale() here but cairo/pixman downscale quality is quite bad.
    243         GRefPtr<GdkPixbuf> scaledIcon = gdk_pixbuf_scale_simple(icon, iconRect.width(), iconRect.height(),
    244                                                                 GDK_INTERP_BILINEAR);
     244        scaledIcon = adoptGRef(gdk_pixbuf_scale_simple(icon, iconRect.width(), iconRect.height(),
     245                                                       GDK_INTERP_BILINEAR));
    245246        icon = scaledIcon.get();
    246247    }
  • trunk/Source/WebKit/gtk/ChangeLog

    r122204 r122233  
     12012-07-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
     2
     3        [GTK] Fix memory leaks by adopting allocation of GdkPixbuf
     4        https://bugs.webkit.org/show_bug.cgi?id=90790
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Fixed a memory leak in WebKitFaviconDatabase by adopting an
     9        allocation of GdkPixbuf.
     10
     11        * webkit/webkitfavicondatabase.cpp:
     12        (getIconPixbufSynchronously):
     13
    1142012-07-10  Adam Barth  <abarth@webkit.org>
    215
  • trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp

    r120694 r122233  
    408408    int pixbufHeight = gdk_pixbuf_get_height(pixbuf.get());
    409409    if (!iconSize.isZero() && (pixbufWidth != iconSize.width() || pixbufHeight != iconSize.height()))
    410         pixbuf = gdk_pixbuf_scale_simple(pixbuf.get(), iconSize.width(), iconSize.height(), GDK_INTERP_BILINEAR);
     410        pixbuf = adoptGRef(gdk_pixbuf_scale_simple(pixbuf.get(), iconSize.width(), iconSize.height(), GDK_INTERP_BILINEAR));
    411411    return pixbuf.leakRef();
    412412}
Note: See TracChangeset for help on using the changeset viewer.