| Index: ui/gfx/image/image.cc
|
| diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
|
| index 70324b182033cdbb6f6a735c238f4616bc6cccd0..0ef9298404c2e63fa65cec549a2fc438c1ac10da 100644
|
| --- a/ui/gfx/image/image.cc
|
| +++ b/ui/gfx/image/image.cc
|
| @@ -36,7 +36,7 @@ NSImage* ImageSkiaToNSImage(const ImageSkia* image);
|
| #endif
|
|
|
| #if defined(TOOLKIT_GTK)
|
| -const SkBitmap* GdkPixbufToSkBitmap(GdkPixbuf* pixbuf) {
|
| +const ImageSkia GdkPixbufToImageSkia(GdkPixbuf* pixbuf) {
|
| CHECK(pixbuf);
|
| gfx::Canvas canvas(gfx::Size(gdk_pixbuf_get_width(pixbuf),
|
| gdk_pixbuf_get_height(pixbuf)), false);
|
| @@ -44,7 +44,7 @@ const SkBitmap* GdkPixbufToSkBitmap(GdkPixbuf* pixbuf) {
|
| cairo_t* cr = scoped_platform_paint.GetPlatformSurface();
|
| gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
|
| cairo_paint(cr);
|
| - return new SkBitmap(canvas.ExtractBitmap());
|
| + return ImageSkia(SkBitmap(canvas.ExtractBitmap()));
|
| }
|
| #endif
|
|
|
| @@ -384,7 +384,7 @@ internal::ImageRep* Image::GetRepresentation(
|
| if (storage_->default_representation_type() == Image::kImageRepGdk) {
|
| internal::ImageRepGdk* pixbuf_rep = default_rep->AsImageRepGdk();
|
| rep = new internal::ImageRepSkia(new ImageSkia(
|
| - internal::GdkPixbufToSkBitmap(pixbuf_rep->pixbuf())));
|
| + internal::GdkPixbufToImageSkia(pixbuf_rep->pixbuf())));
|
| }
|
| // We don't do conversions from CairoCachedSurfaces to Skia because the
|
| // data lives on the display server and we'll always have a GdkPixbuf if we
|
| @@ -422,7 +422,7 @@ internal::ImageRep* Image::GetRepresentation(
|
| #elif defined(TOOLKIT_GTK)
|
| if (rep_type == Image::kImageRepGdk) {
|
| GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(
|
| - default_rep->AsImageRepSkia()->image()->bitmap());
|
| + *default_rep->AsImageRepSkia()->image()->bitmap());
|
| native_rep = new internal::ImageRepGdk(pixbuf);
|
| }
|
| #elif defined(OS_MACOSX)
|
|
|