| Index: cc/font_atlas.h
|
| diff --git a/cc/font_atlas.h b/cc/font_atlas.h
|
| index f9baea14fc2b8963457cd728e3052c11c28bbb24..8e71c7259c0aa8057f8e49b9b9584d2baa970f57 100644
|
| --- a/cc/font_atlas.h
|
| +++ b/cc/font_atlas.h
|
| @@ -9,8 +9,8 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "IntRect.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| +#include "ui/gfx/rect.h"
|
|
|
| class SkCanvas;
|
|
|
| @@ -20,12 +20,10 @@ class Point;
|
|
|
| namespace cc {
|
|
|
| -class IntSize;
|
| -
|
| // This class provides basic ability to draw text onto the heads-up display.
|
| class FontAtlas {
|
| public:
|
| - static scoped_ptr<FontAtlas> create(SkBitmap bitmap, IntRect asciiToRectTable[128], int fontHeight)
|
| + static scoped_ptr<FontAtlas> create(SkBitmap bitmap, gfx::Rect asciiToRectTable[128], int fontHeight)
|
| {
|
| return make_scoped_ptr(new FontAtlas(bitmap, asciiToRectTable, fontHeight));
|
| }
|
| @@ -34,24 +32,24 @@ public:
|
| // Draws multiple lines of text where each line of text is separated by '\n'.
|
| // - Correct glyphs will be drawn for ASCII codes in the range 32-127; any characters
|
| // outside that range will be displayed as a default rectangle glyph.
|
| - // - IntSize clip is used to avoid wasting time drawing things that are outside the
|
| + // - gfx::Size clip is used to avoid wasting time drawing things that are outside the
|
| // target canvas bounds.
|
| // - Should only be called only on the impl thread.
|
| - void drawText(SkCanvas*, const SkPaint&, const std::string& text, const gfx::Point& destPosition, const IntSize& clip) const;
|
| + void drawText(SkCanvas*, const SkPaint&, const std::string& text, const gfx::Point& destPosition, const gfx::Size& clip) const;
|
|
|
| // Draws the entire atlas at the specified position, just for debugging purposes.
|
| void drawDebugAtlas(SkCanvas*, const gfx::Point& destPosition) const;
|
|
|
| private:
|
| - FontAtlas(SkBitmap, IntRect asciiToRectTable[128], int fontHeight);
|
| + FontAtlas(SkBitmap, gfx::Rect asciiToRectTable[128], int fontHeight);
|
|
|
| void drawOneLineOfTextInternal(SkCanvas*, const SkPaint&, const std::string&, const gfx::Point& destPosition) const;
|
|
|
| // The actual texture atlas containing all the pre-rendered glyphs.
|
| SkBitmap m_atlas;
|
|
|
| - // The look-up tables mapping ascii characters to their IntRect locations on the atlas.
|
| - IntRect m_asciiToRectTable[128];
|
| + // The look-up tables mapping ascii characters to their gfx::Rect locations on the atlas.
|
| + gfx::Rect m_asciiToRectTable[128];
|
|
|
| int m_fontHeight;
|
|
|
|
|