summaryrefslogtreecommitdiffstats
path: root/gfx/canvas_skia_win.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 22:40:49 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 22:40:49 +0000
commit62c6a781a95250f273f3bd3df945b3ff850e913e (patch)
treec28cafb3018b81a85227781fd46c3ebe0160f1d6 /gfx/canvas_skia_win.cc
parent1c53ffde1ea034448b09129c975d93aa83b16c94 (diff)
downloadchromium_src-62c6a781a95250f273f3bd3df945b3ff850e913e.zip
chromium_src-62c6a781a95250f273f3bd3df945b3ff850e913e.tar.gz
chromium_src-62c6a781a95250f273f3bd3df945b3ff850e913e.tar.bz2
Cleanup:
* Remove unnecessary code * Make function declaration style match style guide (one arg per line is preferred when all don't fit, but related args may be together) BUG=none TEST=none Review URL: http://codereview.chromium.org/3109019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/canvas_skia_win.cc')
-rw-r--r--gfx/canvas_skia_win.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/gfx/canvas_skia_win.cc b/gfx/canvas_skia_win.cc
index cc8a7eb..46fe2c6 100644
--- a/gfx/canvas_skia_win.cc
+++ b/gfx/canvas_skia_win.cc
@@ -15,8 +15,10 @@ namespace {
// We make sure that LTR text we draw in an RTL context is modified
// appropriately to make sure it maintains it LTR orientation.
-void DoDrawText(HDC hdc, const std::wstring& text,
- RECT* text_bounds, int flags) {
+void DoDrawText(HDC hdc,
+ const std::wstring& text,
+ RECT* text_bounds,
+ int flags) {
std::wstring localized_text;
const wchar_t* string_ptr = text.c_str();
int string_size = static_cast<int>(text.length());
@@ -138,7 +140,8 @@ CanvasSkia::~CanvasSkia() {
// static
void CanvasSkia::SizeStringInt(const std::wstring& text,
const gfx::Font& font,
- int* width, int* height, int flags) {
+ int* width, int* height,
+ int flags) {
// Clamp the max amount of text we'll measure to 2K. When the string is
// actually drawn, it will be clipped to whatever size box is provided, and
// the time to do that doesn't depend on the length being clipped off.
@@ -173,8 +176,10 @@ void CanvasSkia::SizeStringInt(const std::wstring& text,
*height = r.bottom;
}
-void CanvasSkia::DrawStringInt(const std::wstring& text, HFONT font,
- const SkColor& color, int x, int y, int w, int h,
+void CanvasSkia::DrawStringInt(const std::wstring& text,
+ HFONT font,
+ const SkColor& color,
+ int x, int y, int w, int h,
int flags) {
if (!IntersectsClipRectInt(x, y, w, h))
return;
@@ -211,7 +216,8 @@ void CanvasSkia::DrawStringInt(const std::wstring& text, HFONT font,
void CanvasSkia::DrawStringInt(const std::wstring& text,
const gfx::Font& font,
const SkColor& color,
- int x, int y, int w, int h, int flags) {
+ int x, int y, int w, int h,
+ int flags) {
DrawStringInt(text, font.GetNativeFont(), color, x, y, w, h, flags);
}
@@ -287,7 +293,7 @@ void CanvasSkia::DrawStringWithHalo(const std::wstring& text,
}
// Draw the halo bitmap with blur.
- drawBitmap(text_bitmap, SkIntToScalar(x - 1), SkIntToScalar(y - 1));
+ DrawBitmapInt(text_bitmap, x - 1, y - 1);
}
} // namespace gfx