| Index: ui/gfx/image/image_unittest_util.cc
|
| diff --git a/ui/gfx/image/image_unittest_util.cc b/ui/gfx/image/image_unittest_util.cc
|
| index 4baf30a4cc628b57358bea1355f8bb95cf50190b..aa7094c086804a749b829044e42c73acc2f4bf59 100644
|
| --- a/ui/gfx/image/image_unittest_util.cc
|
| +++ b/ui/gfx/image/image_unittest_util.cc
|
| @@ -15,10 +15,7 @@
|
| #include "ui/gfx/codec/png_codec.h"
|
| #include "ui/gfx/image/image_skia.h"
|
|
|
| -#if defined(TOOLKIT_GTK)
|
| -#include <gtk/gtk.h>
|
| -#include "ui/gfx/gtk_util.h"
|
| -#elif defined(OS_IOS)
|
| +#if defined(OS_IOS)
|
| #include "base/mac/foundation_util.h"
|
| #include "base/mac/scoped_cftyperef.h"
|
| #include "skia/ext/skia_utils_ios.h"
|
| @@ -192,8 +189,6 @@ PlatformImage CreatePlatformImage() {
|
| NSImage* image = gfx::SkBitmapToNSImage(bitmap);
|
| base::mac::NSObjectRetain(image);
|
| return image;
|
| -#elif defined(TOOLKIT_GTK)
|
| - return gfx::GdkPixbufFromSkBitmap(bitmap);
|
| #else
|
| return gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
|
| #endif
|
| @@ -204,8 +199,6 @@ gfx::Image::RepresentationType GetPlatformRepresentationType() {
|
| return gfx::Image::kImageRepCocoaTouch;
|
| #elif defined(OS_MACOSX)
|
| return gfx::Image::kImageRepCocoa;
|
| -#elif defined(TOOLKIT_GTK)
|
| - return gfx::Image::kImageRepGdk;
|
| #else
|
| return gfx::Image::kImageRepSkia;
|
| #endif
|
| @@ -216,8 +209,6 @@ PlatformImage ToPlatformType(const gfx::Image& image) {
|
| return image.ToUIImage();
|
| #elif defined(OS_MACOSX)
|
| return image.ToNSImage();
|
| -#elif defined(TOOLKIT_GTK)
|
| - return image.ToGdkPixbuf();
|
| #else
|
| return image.AsImageSkia();
|
| #endif
|
| @@ -228,8 +219,6 @@ PlatformImage CopyPlatformType(const gfx::Image& image) {
|
| return image.CopyUIImage();
|
| #elif defined(OS_MACOSX)
|
| return image.CopyNSImage();
|
| -#elif defined(TOOLKIT_GTK)
|
| - return image.CopyGdkPixbuf();
|
| #else
|
| return image.AsImageSkia();
|
| #endif
|
| @@ -237,16 +226,6 @@ PlatformImage CopyPlatformType(const gfx::Image& image) {
|
|
|
| #if defined(OS_MACOSX)
|
| // Defined in image_unittest_util_mac.mm.
|
| -#elif defined(TOOLKIT_GTK)
|
| -SkColor GetPlatformImageColor(PlatformImage image, int x, int y) {
|
| - int n_channels = gdk_pixbuf_get_n_channels(image);
|
| - int rowstride = gdk_pixbuf_get_rowstride(image);
|
| - guchar* gdk_pixels = gdk_pixbuf_get_pixels(image);
|
| -
|
| - guchar* pixel = gdk_pixels + (y * rowstride) + (x * n_channels);
|
| - guchar alpha = gdk_pixbuf_get_has_alpha(image) ? pixel[3] : 255;
|
| - return SkColorSetARGB(alpha, pixel[0], pixel[1], pixel[2]);
|
| -}
|
| #else
|
| SkColor GetPlatformImageColor(PlatformImage image, int x, int y) {
|
| SkBitmap bitmap = *image.bitmap();
|
| @@ -264,7 +243,7 @@ void CheckIsTransparent(SkColor color) {
|
| }
|
|
|
| bool IsPlatformImageValid(PlatformImage image) {
|
| -#if defined(OS_MACOSX) || defined(TOOLKIT_GTK)
|
| +#if defined(OS_MACOSX)
|
| return image != NULL;
|
| #else
|
| return !image.isNull();
|
| @@ -272,7 +251,7 @@ bool IsPlatformImageValid(PlatformImage image) {
|
| }
|
|
|
| bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2) {
|
| -#if defined(OS_MACOSX) || defined(TOOLKIT_GTK)
|
| +#if defined(OS_MACOSX)
|
| return image1 == image2;
|
| #else
|
| return image1.BackedBySameObjectAs(image2);
|
|
|