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

Unified Diff: views/view_text_utils.cc

Issue 2825018: Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months 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
« gfx/canvas.h ('K') | « views/view.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_text_utils.cc
===================================================================
--- views/view_text_utils.cc (revision 50661)
+++ views/view_text_utils.cc (working copy)
@@ -9,7 +9,7 @@
#include "base/i18n/word_iterator.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
-#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "gfx/color_utils.h"
#include "gfx/size.h"
#include "views/controls/label.h"
@@ -118,7 +118,7 @@
word = text; // Draw the whole text at once.
int w = font.GetStringWidth(word), h = font.height();
- canvas->SizeStringInt(word, font, &w, &h, flags);
+ gfx::CanvasSkia::SizeStringInt(word, font, &w, &h, flags);
// If we exceed the boundaries, we need to wrap.
WrapIfWordDoesntFit(w, font.height(), position, bounds);
@@ -132,7 +132,7 @@
// left of the LTR string.
if (ltr_within_rtl && word[word.size() - 1] == L' ') {
int space_w = font.GetStringWidth(L" "), space_h = font.height();
- canvas->SizeStringInt(L" ", font, &space_w, &space_h, flags);
+ gfx::CanvasSkia::SizeStringInt(L" ", font, &space_w, &space_h, flags);
x += space_w;
}
}
« gfx/canvas.h ('K') | « views/view.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698