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

Unified Diff: ui/gfx/canvas_skia_win.cc

Issue 8681001: Revert 111288 - Possibly broke media_unittests on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_skia_win.cc
===================================================================
--- ui/gfx/canvas_skia_win.cc (revision 111322)
+++ ui/gfx/canvas_skia_win.cc (working copy)
@@ -415,11 +415,10 @@
// Create a temporary buffer filled with the halo color. It must leave room
// for the 1-pixel border around the text.
- gfx::Rect rect(gfx::Point(), gfx::Size(w + 2, h + 2));
- CanvasSkia text_canvas(rect.width(), rect.height(), true);
+ CanvasSkia text_canvas(w + 2, h + 2, true);
SkPaint bkgnd_paint;
bkgnd_paint.setColor(halo_color);
- text_canvas.DrawRect(rect, bkgnd_paint);
+ text_canvas.DrawRectInt(0, 0, w + 2, h + 2, bkgnd_paint);
// Draw the text into the temporary buffer. This will have correct
// ClearType since the background color is the same as the halo color.
@@ -429,8 +428,7 @@
// opaque. We have to do this first since pixelShouldGetHalo will check for
// 0 to see if a pixel has been modified to transparent, and black text that
// Windows draw will look transparent to it!
- skia::MakeOpaque(text_canvas.sk_canvas(), rect.x(), rect.y(), rect.width(),
- rect.height());
+ skia::MakeOpaque(text_canvas.sk_canvas(), 0, 0, w + 2, h + 2);
uint32_t halo_premul = SkPreMultiplyColor(halo_color);
SkBitmap& text_bitmap = const_cast<SkBitmap&>(
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698