summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 23:07:42 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 23:07:42 +0000
commit0d74f1e8fe44154ab7842812443b3138b2993c8c (patch)
tree11c2f071f68c19b3f25eed9150c1be11864eedc5 /chrome
parentf799dd77cdfe8e5b29236547801f2e89ed0ed079 (diff)
downloadchromium_src-0d74f1e8fe44154ab7842812443b3138b2993c8c.zip
chromium_src-0d74f1e8fe44154ab7842812443b3138b2993c8c.tar.gz
chromium_src-0d74f1e8fe44154ab7842812443b3138b2993c8c.tar.bz2
Move skia_utils into the skia namespace.
Review URL: http://codereview.chromium.org/14079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc28
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc2
-rw-r--r--chrome/browser/views/options/content_page_view.cc2
-rw-r--r--chrome/browser/views/sad_tab_view.cc6
-rw-r--r--chrome/common/gfx/color_utils.cc2
-rw-r--r--chrome/views/background.cc2
-rw-r--r--chrome/views/single_split_view.cc2
-rw-r--r--chrome/views/table_view.cc6
-rw-r--r--chrome/views/text_field.cc2
9 files changed, 26 insertions, 26 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index f2f2506..e1327ac 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -259,7 +259,7 @@ class BookmarkButton : public views::TextButton {
// the parent's actual bounds because they differ from what is painted.
SkPaint paint;
paint.setAlpha(static_cast<int>((1.0 - animation_value) * 255));
- paint.setShader(gfx::CreateGradientShader(0,
+ paint.setShader(skia::CreateGradientShader(0,
view->height() + kTopMargin + kBottomMargin,
kTopBorderColor,
kBackgroundColor))->safeUnref();
@@ -607,16 +607,16 @@ class ButtonSeparatorView : public views::View {
virtual void Paint(ChromeCanvas* canvas) {
SkPaint paint;
- paint.setShader(gfx::CreateGradientShader(0,
- height() / 2,
- kTopBorderColor,
- kSeparatorColor))->safeUnref();
+ paint.setShader(skia::CreateGradientShader(0,
+ height() / 2,
+ kTopBorderColor,
+ kSeparatorColor))->safeUnref();
SkRect rc = {SkIntToScalar(kSeparatorStartX), SkIntToScalar(0),
SkIntToScalar(1), SkIntToScalar(height() / 2) };
canvas->drawRect(rc, paint);
SkPaint paint_down;
- paint_down.setShader(gfx::CreateGradientShader(height() / 2,
+ paint_down.setShader(skia::CreateGradientShader(height() / 2,
height(),
kSeparatorColor,
kBackgroundColor))->safeUnref();
@@ -908,10 +908,10 @@ void BookmarkBarView::Paint(ChromeCanvas* canvas) {
// Draw our background.
SkPaint paint;
paint.setAntiAlias(true);
- paint.setShader(gfx::CreateGradientShader(0,
- height(),
- kTopBorderColor,
- kBackgroundColor))->safeUnref();
+ paint.setShader(skia::CreateGradientShader(0,
+ height(),
+ kTopBorderColor,
+ kBackgroundColor))->safeUnref();
canvas->drawRoundRect(rect,
SkDoubleToScalar(roundness),
@@ -928,10 +928,10 @@ void BookmarkBarView::Paint(ChromeCanvas* canvas) {
SkDoubleToScalar(roundness), border_paint);
} else {
SkPaint paint;
- paint.setShader(gfx::CreateGradientShader(0,
- height(),
- kTopBorderColor,
- kBackgroundColor))->safeUnref();
+ paint.setShader(skia::CreateGradientShader(0,
+ height(),
+ kTopBorderColor,
+ kBackgroundColor))->safeUnref();
canvas->FillRectInt(0, 0, width(), height(), paint);
canvas->FillRectInt(kTopBorderColor, 0, 0, width(), 1);
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index 4971019..10fa423 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -304,7 +304,7 @@ void BookmarkManagerView::PaintBackground(ChromeCanvas* canvas) {
canvas->drawColor(kBackgroundColorBottom, SkPorterDuff::kSrc_Mode);
SkPaint paint;
- paint.setShader(gfx::CreateGradientShader(0, kBackgroundGradientHeight,
+ paint.setShader(skia::CreateGradientShader(0, kBackgroundGradientHeight,
kBackgroundColorTop,
kBackgroundColorBottom))->safeUnref();
canvas->FillRectInt(0, 0, width(), kBackgroundGradientHeight, paint);
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index 627c387..a534a4b 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -102,7 +102,7 @@ void FileDisplayArea::Paint(ChromeCanvas* canvas) {
RECT rect = { 0, 0, width(), height() };
gfx::NativeTheme::instance()->PaintTextField(
dc, EP_EDITTEXT, ETS_READONLY, 0, &rect,
- gfx::SkColorToCOLORREF(text_field_background_color_), true, true);
+ skia::SkColorToCOLORREF(text_field_background_color_), true, true);
canvas->endPlatformPaint();
canvas->DrawBitmapInt(default_folder_icon_, icon_bounds_.x(),
icon_bounds_.y());
diff --git a/chrome/browser/views/sad_tab_view.cc b/chrome/browser/views/sad_tab_view.cc
index 26d7f5f..7ec0ec1 100644
--- a/chrome/browser/views/sad_tab_view.cc
+++ b/chrome/browser/views/sad_tab_view.cc
@@ -37,9 +37,9 @@ SadTabView::SadTabView() {
void SadTabView::Paint(ChromeCanvas* canvas) {
SkPaint paint;
- paint.setShader(gfx::CreateGradientShader(0, height(),
- kBackgroundColor,
- kBackgroundEndColor))->safeUnref();
+ paint.setShader(skia::CreateGradientShader(0, height(),
+ kBackgroundColor,
+ kBackgroundEndColor))->safeUnref();
paint.setStyle(SkPaint::kFill_Style);
canvas->drawRectCoords(0, 0,
SkIntToScalar(width()), SkIntToScalar(height()),
diff --git a/chrome/common/gfx/color_utils.cc b/chrome/common/gfx/color_utils.cc
index 1ab1849..cdb4c0c 100644
--- a/chrome/common/gfx/color_utils.cc
+++ b/chrome/common/gfx/color_utils.cc
@@ -255,7 +255,7 @@ SkColor SetColorAlpha(SkColor c, SkAlpha alpha) {
SkColor GetSysSkColor(int which) {
#if defined(OS_WIN)
- return gfx::COLORREFToSkColor(::GetSysColor(which));
+ return skia::COLORREFToSkColor(::GetSysColor(which));
#else
NOTIMPLEMENTED();
return SK_ColorLTGRAY;
diff --git a/chrome/views/background.cc b/chrome/views/background.cc
index 3642924..1aa631e 100644
--- a/chrome/views/background.cc
+++ b/chrome/views/background.cc
@@ -68,7 +68,7 @@ Background::~Background() {
void Background::SetNativeControlColor(SkColor color) {
DeleteObject(native_control_brush_);
- native_control_brush_ = CreateSolidBrush(gfx::SkColorToCOLORREF(color));
+ native_control_brush_ = CreateSolidBrush(skia::SkColorToCOLORREF(color));
}
//static
diff --git a/chrome/views/single_split_view.cc b/chrome/views/single_split_view.cc
index 36e8519..a7832b6 100644
--- a/chrome/views/single_split_view.cc
+++ b/chrome/views/single_split_view.cc
@@ -19,7 +19,7 @@ SingleSplitView::SingleSplitView(View* leading, View* trailing)
AddChildView(trailing);
set_background(
views::Background::CreateSolidBackground(
- gfx::COLORREFToSkColor(GetSysColor(COLOR_3DFACE))));
+ skia::COLORREFToSkColor(GetSysColor(COLOR_3DFACE))));
}
void SingleSplitView::Layout() {
diff --git a/chrome/views/table_view.cc b/chrome/views/table_view.cc
index c061951..781f262 100644
--- a/chrome/views/table_view.cc
+++ b/chrome/views/table_view.cc
@@ -1206,10 +1206,10 @@ LRESULT TableView::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
custom_cell_font_ = CreateFontIndirect(&logfont);
SelectObject(draw_info->nmcd.hdc, custom_cell_font_);
draw_info->clrText = foreground.color_is_set
- ? gfx::SkColorToCOLORREF(foreground.color)
+ ? skia::SkColorToCOLORREF(foreground.color)
: CLR_DEFAULT;
draw_info->clrTextBk = background.color_is_set
- ? gfx::SkColorToCOLORREF(background.color)
+ ? skia::SkColorToCOLORREF(background.color)
: CLR_DEFAULT;
return CDRF_NEWFONT;
}
@@ -1259,7 +1259,7 @@ LRESULT TableView::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
// background (or rather windows paints background, then invokes
// this twice). As such, we always fill in the background.
canvas.drawColor(
- gfx::COLORREFToSkColor(GetSysColor(bg_color_index)),
+ skia::COLORREFToSkColor(GetSysColor(bg_color_index)),
SkPorterDuff::kSrc_Mode);
// + 1 for padding (we declared the image as 18x18 in the list-
// view when they are 16x16 so we get an extra pixel of padding).
diff --git a/chrome/views/text_field.cc b/chrome/views/text_field.cc
index 14a9305..62ebdc8 100644
--- a/chrome/views/text_field.cc
+++ b/chrome/views/text_field.cc
@@ -1087,7 +1087,7 @@ void TextField::UpdateEditBackgroundColor() {
COLORREF bg_color;
if (!use_default_background_color_)
- bg_color = gfx::SkColorToCOLORREF(background_color_);
+ bg_color = skia::SkColorToCOLORREF(background_color_);
else
bg_color = GetSysColor(read_only_ ? COLOR_3DFACE : COLOR_WINDOW);
edit_->SetBackgroundColor(bg_color);