diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-07 13:29:20 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-07 13:29:20 +0000 |
commit | 243cac7d0d9961ec15cea368168b98b7a4522f8d (patch) | |
tree | 42fadb8cda77fc9c48d9b40439ac9aafc33d4550 /ui/gfx | |
parent | 3e03036a6033332a4611b1d28a2f85b42f13a7c9 (diff) | |
download | chromium_src-243cac7d0d9961ec15cea368168b98b7a4522f8d.zip chromium_src-243cac7d0d9961ec15cea368168b98b7a4522f8d.tar.gz chromium_src-243cac7d0d9961ec15cea368168b98b7a4522f8d.tar.bz2 |
Rename DrawBitmapInt to DrawImageInt
Bug=None
Test=Compiles
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140877
Review URL: https://chromiumcodereview.appspot.com/10512021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx')
-rw-r--r-- | ui/gfx/canvas.cc | 34 | ||||
-rw-r--r-- | ui/gfx/canvas.h | 26 | ||||
-rw-r--r-- | ui/gfx/canvas_linux.cc | 2 | ||||
-rw-r--r-- | ui/gfx/canvas_skia.cc | 2 | ||||
-rw-r--r-- | ui/gfx/canvas_win.cc | 2 |
5 files changed, 33 insertions, 33 deletions
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc index f3419fc..5dbb00e 100644 --- a/ui/gfx/canvas.cc +++ b/ui/gfx/canvas.cc @@ -38,7 +38,7 @@ Canvas::Canvas(const SkBitmap& bitmap, bool is_opaque) : owned_canvas_(new skia::PlatformCanvas(bitmap.width(), bitmap.height(), is_opaque)), canvas_(owned_canvas_.get()) { - DrawBitmapInt(bitmap, 0, 0); + DrawImageInt(bitmap, 0, 0); } Canvas::Canvas() @@ -253,14 +253,14 @@ void Canvas::DrawFocusRect(const gfx::Rect& rect) { DrawDashedRect(rect, SK_ColorGRAY); } -void Canvas::DrawBitmapInt(const gfx::ImageSkia& image, int x, int y) { +void Canvas::DrawImageInt(const gfx::ImageSkia& image, int x, int y) { SkPaint paint; - DrawBitmapInt(image, x, y, paint); + DrawImageInt(image, x, y, paint); } -void Canvas::DrawBitmapInt(const gfx::ImageSkia& image, - int x, int y, - const SkPaint& paint) { +void Canvas::DrawImageInt(const gfx::ImageSkia& image, + int x, int y, + const SkPaint& paint) { float bitmap_scale; const SkBitmap& bitmap = GetBitmapToPaint(image, &bitmap_scale); if (bitmap.isNull()) @@ -276,20 +276,20 @@ void Canvas::DrawBitmapInt(const gfx::ImageSkia& image, canvas_->restore(); } -void Canvas::DrawBitmapInt(const gfx::ImageSkia& image, - int src_x, int src_y, int src_w, int src_h, - int dest_x, int dest_y, int dest_w, int dest_h, - bool filter) { +void Canvas::DrawImageInt(const gfx::ImageSkia& image, + int src_x, int src_y, int src_w, int src_h, + int dest_x, int dest_y, int dest_w, int dest_h, + bool filter) { SkPaint p; - DrawBitmapInt(image, src_x, src_y, src_w, src_h, dest_x, dest_y, - dest_w, dest_h, filter, p); + DrawImageInt(image, src_x, src_y, src_w, src_h, dest_x, dest_y, + dest_w, dest_h, filter, p); } -void Canvas::DrawBitmapInt(const gfx::ImageSkia& image, - int src_x, int src_y, int src_w, int src_h, - int dest_x, int dest_y, int dest_w, int dest_h, - bool filter, - const SkPaint& paint) { +void Canvas::DrawImageInt(const gfx::ImageSkia& image, + int src_x, int src_y, int src_w, int src_h, + int dest_x, int dest_y, int dest_w, int dest_h, + bool filter, + const SkPaint& paint) { DLOG_ASSERT(src_x + src_w < std::numeric_limits<int16_t>::max() && src_y + src_h < std::numeric_limits<int16_t>::max()); if (src_w <= 0 || src_h <= 0) { diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h index 5c7bb9f..6780774 100644 --- a/ui/gfx/canvas.h +++ b/ui/gfx/canvas.h @@ -245,16 +245,16 @@ class UI_EXPORT Canvas { // corner of the bitmap is rendered at the specified location. // Parameters are specified relative to current canvas scale not in pixels. // Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1. - void DrawBitmapInt(const gfx::ImageSkia&, int x, int y); + void DrawImageInt(const gfx::ImageSkia&, int x, int y); // Draws an image with the origin at the specified location, using the // specified paint. The upper left corner of the bitmap is rendered at the // specified location. // Parameters are specified relative to current canvas scale not in pixels. // Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1. - void DrawBitmapInt(const gfx::ImageSkia& image, - int x, int y, - const SkPaint& paint); + void DrawImageInt(const gfx::ImageSkia& image, + int x, int y, + const SkPaint& paint); // Draws a portion of an image in the specified location. The src parameters // correspond to the region of the bitmap to draw in the region defined @@ -268,15 +268,15 @@ class UI_EXPORT Canvas { // An optional custom SkPaint can be provided. // Parameters are specified relative to current canvas scale not in pixels. // Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1. - void DrawBitmapInt(const gfx::ImageSkia& image, - int src_x, int src_y, int src_w, int src_h, - int dest_x, int dest_y, int dest_w, int dest_h, - bool filter); - void DrawBitmapInt(const gfx::ImageSkia& image, - int src_x, int src_y, int src_w, int src_h, - int dest_x, int dest_y, int dest_w, int dest_h, - bool filter, - const SkPaint& paint); + void DrawImageInt(const gfx::ImageSkia& image, + int src_x, int src_y, int src_w, int src_h, + int dest_x, int dest_y, int dest_w, int dest_h, + bool filter); + void DrawImageInt(const gfx::ImageSkia& image, + int src_x, int src_y, int src_w, int src_h, + int dest_x, int dest_y, int dest_w, int dest_h, + bool filter, + const SkPaint& paint); // Draws text with the specified color, font and location. The text is // aligned to the left, vertically centered, clipped to the region. If the diff --git a/ui/gfx/canvas_linux.cc b/ui/gfx/canvas_linux.cc index 576eed2..9d417c9 100644 --- a/ui/gfx/canvas_linux.cc +++ b/ui/gfx/canvas_linux.cc @@ -157,7 +157,7 @@ void DrawStringContext::DrawWithHalo(SkColor text_color, const SkBitmap& text_bitmap = const_cast<SkBitmap&>( skia::GetTopDevice(*text_canvas.sk_canvas())->accessBitmap(false)); - canvas_->DrawBitmapInt(text_bitmap, text_rect_.x() - 1, text_rect_.y() - 1); + canvas_->DrawImageInt(text_bitmap, text_rect_.x() - 1, text_rect_.y() - 1); } void DrawStringContext::DrawUnderline(cairo_t* cr, double extra_edge_width) { diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc index 5c51481..003b2d1 100644 --- a/ui/gfx/canvas_skia.cc +++ b/ui/gfx/canvas_skia.cc @@ -396,7 +396,7 @@ void Canvas::DrawStringWithHalo(const string16& text, } // Draw the halo bitmap with blur. - DrawBitmapInt(text_bitmap, x - 1, y - 1); + DrawImageInt(text_bitmap, x - 1, y - 1); } // TODO(asvitkine): Remove the ifdef once all platforms use canvas_skia.cc. diff --git a/ui/gfx/canvas_win.cc b/ui/gfx/canvas_win.cc index 6e1249a..f38dccc 100644 --- a/ui/gfx/canvas_win.cc +++ b/ui/gfx/canvas_win.cc @@ -455,7 +455,7 @@ void Canvas::DrawStringWithHalo(const string16& text, } // Draw the halo bitmap with blur. - DrawBitmapInt(text_bitmap, x - 1, y - 1); + DrawImageInt(text_bitmap, x - 1, y - 1); } void Canvas::DrawFadeTruncatingString( |