or
2010-11-15 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by NOBODY (OOPS!).
[GTK] Use gdk_pixbuf_get_from_surface() when available
https://bugs.webkit.org/show_bug.cgi?id=49532
* platform/graphics/gtk/GdkCairoUtilities.cpp:
(cairoImageSurfaceToGdkPixbuf):
2010-11-14 David Hyatt <hyatt@apple.com>
Back out the italics portion of the previous patch until I can figure out why it
#include <cairo.h>
#include <gtk/gtk.h>
#ifndef GTK_API_VERSION_2
GdkPixbuf* cairoImageSurfaceToGdkPixbuf(cairo_surface_t* surface)
{
return gdk_pixbuf_get_from_surface(surface, 0, 0,
cairo_image_surface_get_width(surface),
cairo_image_surface_get_height(surface));
}
#else
static inline unsigned char* getCairoSurfacePixel(unsigned char* data, unsigned x, unsigned y, unsigned rowStride)
return data + (y * rowStride) + x * 4;
return dest;
#endif // GTK_API_VERSION_2