diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 20:40:52 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 20:40:52 +0000 |
commit | 0819b02efb758f7b3f6e5661a18fa7908720cac5 (patch) | |
tree | 7e0cce071d63804f06451d08c4a26e747a28ecc2 /chrome/browser/gtk | |
parent | b5685797f80769c3db0c3c3a1c6bc117b2029b71 (diff) | |
download | chromium_src-0819b02efb758f7b3f6e5661a18fa7908720cac5.zip chromium_src-0819b02efb758f7b3f6e5661a18fa7908720cac5.tar.gz chromium_src-0819b02efb758f7b3f6e5661a18fa7908720cac5.tar.bz2 |
Move functions from skia/ext to app/gfx where possible: most of skia_utils.* and image_operations.* can be moved because they are not used by WebKit code.
This also fixes the spelling of "Convolusion" to "Convolution" and updates some copyrights.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/207059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/browser_titlebar.cc | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/custom_button.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/gtk_theme_provider.cc | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/gtk_theme_provider.h | 5 | ||||
-rw-r--r-- | chrome/browser/gtk/tabs/tab_renderer_gtk.cc | 6 |
6 files changed, 15 insertions, 16 deletions
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc index cc72cf6..9405c70 100644 --- a/chrome/browser/gtk/browser_titlebar.cc +++ b/chrome/browser/gtk/browser_titlebar.cc @@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "app/gfx/skbitmap_operations.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/gfx/gtk_util.h" @@ -31,7 +32,6 @@ #include "grit/app_resources.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" -#include "skia/ext/image_operations.h" namespace { @@ -590,7 +590,7 @@ static void MakeThrobberFrames(int resource_id, // Make a separate GdkPixbuf for each frame of the animation. for (size_t i = 0; i < num_frames; ++i) { - SkBitmap frame = skia::ImageOperations::CreateTiledBitmap(*frame_strip, + SkBitmap frame = SkBitmapOperations::CreateTiledBitmap(*frame_strip, i * frame_size, 0, frame_size, frame_size); frames->push_back(gfx::GdkPixbufFromSkBitmap(&frame)); } diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index aec56c2..bc4ba6f 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -9,6 +9,7 @@ #include <string> +#include "app/gfx/color_utils.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" @@ -75,7 +76,6 @@ #include "grit/generated_resources.h" #include "grit/google_chrome_strings.h" #include "grit/theme_resources.h" -#include "skia/ext/skia_utils.h" #include "skia/ext/skia_utils_gtk.h" #if defined(OS_CHROMEOS) @@ -1765,8 +1765,8 @@ void BrowserWindowGtk::SetBackgroundColor() { // When the cursor is over the divider, GTK+ normally lightens the background // color by 1.3 (see LIGHTNESS_MULT in gtkstyle.c). Since we're setting the // color, override the prelight also. - skia::HSL hsl = { -1, 0.5, 0.65 }; - SkColor frame_prelight_color = skia::HSLShift(frame_color, hsl); + color_utils::HSL hsl = { -1, 0.5, 0.65 }; + SkColor frame_prelight_color = color_utils::HSLShift(frame_color, hsl); GdkColor frame_prelight_color_gdk = SkColorToGdkColor(frame_prelight_color); gtk_widget_modify_bg(contents_split_, GTK_STATE_PRELIGHT, &frame_prelight_color_gdk); diff --git a/chrome/browser/gtk/custom_button.cc b/chrome/browser/gtk/custom_button.cc index 745f495..3e4e1cf 100644 --- a/chrome/browser/gtk/custom_button.cc +++ b/chrome/browser/gtk/custom_button.cc @@ -4,6 +4,7 @@ #include "chrome/browser/gtk/custom_button.h" +#include "app/gfx/skbitmap_operations.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" @@ -15,7 +16,6 @@ #include "chrome/common/gtk_util.h" #include "chrome/common/notification_service.h" #include "grit/theme_resources.h" -#include "skia/ext/image_operations.h" CustomDrawButtonBase::CustomDrawButtonBase(GtkThemeProvider* theme_provider, int normal_id, int active_id, int highlight_id, int depressed_id) @@ -104,8 +104,8 @@ void CustomDrawButtonBase::SetBackground(SkColor color, background_image_->UsePixbuf(NULL); } } else { - SkBitmap img = skia::ImageOperations::CreateButtonBackground(color, - *image, *mask); + SkBitmap img = + SkBitmapOperations::CreateButtonBackground(color, *image, *mask); GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&img); background_image_->UsePixbuf(pixbuf); diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc index 428e58b..2354d1d 100644 --- a/chrome/browser/gtk/gtk_theme_provider.cc +++ b/chrome/browser/gtk/gtk_theme_provider.cc @@ -352,8 +352,8 @@ void GtkThemeProvider::LoadGtkValues() { // color, change the luminosity of the frame color downwards to 80% of what // it currently is. This is in a futile attempt to match the default // metacity and xfwm themes. - SkColor shifted = skia::HSLShift(GdkToSkColor(&frame_color), - kDefaultFrameShift); + SkColor shifted = color_utils::HSLShift(GdkToSkColor(&frame_color), + kDefaultFrameShift); frame_color.pixel = 0; frame_color.red = SkColorGetR(shifted) * kSkiaToGDKMultiplier; frame_color.green = SkColorGetG(shifted) * kSkiaToGDKMultiplier; diff --git a/chrome/browser/gtk/gtk_theme_provider.h b/chrome/browser/gtk/gtk_theme_provider.h index 14b6e73..a7b7ab3 100644 --- a/chrome/browser/gtk/gtk_theme_provider.h +++ b/chrome/browser/gtk/gtk_theme_provider.h @@ -9,12 +9,11 @@ #include <string> #include <vector> +#include "app/gfx/color_utils.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/common/notification_observer.h" #include "chrome/common/owned_widget_gtk.h" -#include "skia/ext/skia_utils.h" - class CairoCachedSurface; class Profile; @@ -112,7 +111,7 @@ class GtkThemeProvider : public BrowserThemeProvider, // Sets the underlying theme colors/tints from a GTK color. void SetThemeColorFromGtk(const char* id, GdkColor* color); void SetThemeTintFromGtk(const char* id, GdkColor* color, - const skia::HSL& default_tint); + const color_utils::HSL& default_tint); // Split out from FreePlatformCaches so it can be called in our destructor; // FreePlatformCaches() is called from the BrowserThemeProvider's destructor, diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 213475a..658d01f 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -9,6 +9,7 @@ #include "app/gfx/canvas_paint.h" #include "app/gfx/favicon_size.h" +#include "app/gfx/skbitmap_operations.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "chrome/browser/browser.h" @@ -23,7 +24,6 @@ #include "grit/app_resources.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" -#include "skia/ext/image_operations.h" namespace { @@ -697,13 +697,13 @@ SkBitmap* TabRendererGtk::GetMaskedBitmap(const SkBitmap* mask, // offsets. delete it->second.bitmap; } - SkBitmap image = skia::ImageOperations::CreateTiledBitmap( + SkBitmap image = SkBitmapOperations::CreateTiledBitmap( *background, bg_offset_x, bg_offset_y, mask->width(), height() + kToolbarOverlap); CachedBitmap bitmap = { bg_offset_x, bg_offset_y, - new SkBitmap(skia::ImageOperations::CreateMaskedBitmap(image, *mask)) + new SkBitmap(SkBitmapOperations::CreateMaskedBitmap(image, *mask)) }; cached_bitmaps_[std::make_pair(mask, background)] = bitmap; return bitmap.bitmap; |