OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_FONT_ATLAS_H_ | 5 #ifndef CC_FONT_ATLAS_H_ |
6 #define CC_FONT_ATLAS_H_ | 6 #define CC_FONT_ATLAS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/threading/thread_checker.h" |
12 #include "cc/cc_export.h" | 13 #include "cc/cc_export.h" |
13 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
15 | 16 |
16 class SkCanvas; | 17 class SkCanvas; |
17 | 18 |
18 namespace gfx { | 19 namespace gfx { |
19 class Point; | 20 class Point; |
20 class Size; | 21 class Size; |
21 } | 22 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void drawOneLineOfTextInternal(SkCanvas*, const SkPaint&, const std::string&
, const gfx::Point& destPosition) const; | 55 void drawOneLineOfTextInternal(SkCanvas*, const SkPaint&, const std::string&
, const gfx::Point& destPosition) const; |
55 | 56 |
56 // The actual texture atlas containing all the pre-rendered glyphs. | 57 // The actual texture atlas containing all the pre-rendered glyphs. |
57 SkBitmap m_atlas; | 58 SkBitmap m_atlas; |
58 | 59 |
59 // The look-up tables mapping ascii characters to their gfx::Rect locations
on the atlas. | 60 // The look-up tables mapping ascii characters to their gfx::Rect locations
on the atlas. |
60 gfx::Rect m_asciiToRectTable[128]; | 61 gfx::Rect m_asciiToRectTable[128]; |
61 | 62 |
62 int m_fontHeight; | 63 int m_fontHeight; |
63 | 64 |
| 65 base::ThreadChecker m_threadChecker; |
| 66 |
64 DISALLOW_COPY_AND_ASSIGN(FontAtlas); | 67 DISALLOW_COPY_AND_ASSIGN(FontAtlas); |
65 }; | 68 }; |
66 | 69 |
67 } // namespace cc | 70 } // namespace cc |
68 | 71 |
69 #endif // CC_FONT_ATLAS_H_ | 72 #endif // CC_FONT_ATLAS_H_ |
OLD | NEW |