Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: gfx/canvas_skia.h

Issue 5071002: Add 1px black border for ChromeOS status button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change how common code is shared Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/status/status_area_button.cc ('k') | gfx/canvas_skia_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/canvas_skia.h
diff --git a/gfx/canvas_skia.h b/gfx/canvas_skia.h
index 27781ff24f2633651f53a58e6da152fef11dcebc..d30978428f941c764d05579696346f0eec38cac0 100644
--- a/gfx/canvas_skia.h
+++ b/gfx/canvas_skia.h
@@ -67,11 +67,13 @@ class CanvasSkia : public skia::PlatformCanvas,
void DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y);
#endif
-#ifdef OS_WIN // Only implemented on Windows for now.
- // Draws text with a 1-pixel halo around it of the given color. It allows
- // ClearType to be drawn to an otherwise transparenct bitmap for drag images.
- // Drag images have only 1-bit of transparency, so we don't do any fancy
- // blurring.
+#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX))
+ // Draws text with a 1-pixel halo around it of the given color.
+ // On Windows, it allows ClearType to be drawn to an otherwise transparenct
+ // bitmap for drag images. Drag images have only 1-bit of transparency, so
+ // we don't do any fancy blurring.
+ // On Linux, text with halo is created by stroking it with 2px |halo_color|
+ // then filling it with |text_color|.
void DrawStringWithHalo(const std::wstring& text,
const gfx::Font& font,
const SkColor& text_color,
« no previous file with comments | « chrome/browser/chromeos/status/status_area_button.cc ('k') | gfx/canvas_skia_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698