summaryrefslogtreecommitdiffstats
path: root/views/view_text_utils.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 23:52:00 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 23:52:00 +0000
commitb0f1a563d2b0ff26b9a6ad81258e08b966c9149a (patch)
tree8a4fcddb3cbe92bc3ff11a23cc2fc6a8fb099186 /views/view_text_utils.cc
parent24fc19f3cff67e621cf9962eb135cfed4de7e65c (diff)
downloadchromium_src-b0f1a563d2b0ff26b9a6ad81258e08b966c9149a.zip
chromium_src-b0f1a563d2b0ff26b9a6ad81258e08b966c9149a.tar.gz
chromium_src-b0f1a563d2b0ff26b9a6ad81258e08b966c9149a.tar.bz2
Revert 50784 - Canvas refactoring part 3.
- Replace Canvas instance users with CanvasSkia users. - Rename Canvas2 to Canvas. - Delete Canvas subclass of CanvasSkia. This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API. BUG=none TEST=none Review URL: http://codereview.chromium.org/2825018 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/2811032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_text_utils.cc')
-rw-r--r--views/view_text_utils.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/view_text_utils.cc b/views/view_text_utils.cc
index ea1bba7..1fb39d3 100644
--- a/views/view_text_utils.cc
+++ b/views/view_text_utils.cc
@@ -9,7 +9,7 @@
#include "base/i18n/word_iterator.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
-#include "gfx/canvas_skia.h"
+#include "gfx/canvas.h"
#include "gfx/color_utils.h"
#include "gfx/size.h"
#include "views/controls/label.h"
@@ -118,7 +118,7 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
word = text; // Draw the whole text at once.
int w = font.GetStringWidth(word), h = font.height();
- gfx::CanvasSkia::SizeStringInt(word, font, &w, &h, flags);
+ canvas->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 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
// left of the LTR string.
if (ltr_within_rtl && word[word.size() - 1] == L' ') {
int space_w = font.GetStringWidth(L" "), space_h = font.height();
- gfx::CanvasSkia::SizeStringInt(L" ", font, &space_w, &space_h, flags);
+ canvas->SizeStringInt(L" ", font, &space_w, &space_h, flags);
x += space_w;
}
}