summaryrefslogtreecommitdiffstats
path: root/cc/font_atlas.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 18:15:58 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 18:15:58 +0000
commitaad0a007e1cd343892d7b13ce5ea8d90e8ef7f53 (patch)
tree24c9af166977bbf8f25aa5b129defb35f3f8ec05 /cc/font_atlas.h
parent33432d8c37e3b929c60097c1eb7a53b13f364fb5 (diff)
downloadchromium_src-aad0a007e1cd343892d7b13ce5ea8d90e8ef7f53.zip
chromium_src-aad0a007e1cd343892d7b13ce5ea8d90e8ef7f53.tar.gz
chromium_src-aad0a007e1cd343892d7b13ce5ea8d90e8ef7f53.tar.bz2
cc: Use gfx:: Geometry types for positions, bounds, and related things.
This covers layers, layer tree hosts, and related classes. *phew* I intentionally avoided anything to do with scrolling or page scale. Those should be changed to be Vectors and need a bit more thought. This change should be pretty mindless. It converts to gfx Rect, Size, Vector, and Point classes. No change is made for FloatPoint3D or FloatQuad yet. I've added cc/geometry.h as a place for free functions that don't exist on gfx types yet, and that we should port over in the future. No change in behaviour; covered by existing tests. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11264056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/font_atlas.h')
-rw-r--r--cc/font_atlas.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/cc/font_atlas.h b/cc/font_atlas.h
index 1858c12..0a227a6 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;
@@ -24,7 +24,7 @@ namespace cc {
// 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));
}
@@ -42,15 +42,15 @@ public:
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;