OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_GFX_RENDER_TEXT_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_H_ |
6 #define UI_GFX_RENDER_TEXT_H_ | 6 #define UI_GFX_RENDER_TEXT_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
| 17 #include "skia/ext/refptr.h" |
17 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
18 #include "third_party/skia/include/core/SkPaint.h" | 19 #include "third_party/skia/include/core/SkPaint.h" |
19 #include "third_party/skia/include/core/SkRect.h" | 20 #include "third_party/skia/include/core/SkRect.h" |
20 #include "ui/base/range/range.h" | 21 #include "ui/base/range/range.h" |
21 #include "ui/gfx/break_list.h" | 22 #include "ui/gfx/break_list.h" |
22 #include "ui/gfx/font_list.h" | 23 #include "ui/gfx/font_list.h" |
23 #include "ui/gfx/point.h" | 24 #include "ui/gfx/point.h" |
24 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
25 #include "ui/gfx/selection_model.h" | 26 #include "ui/gfx/selection_model.h" |
26 #include "ui/gfx/shadow_value.h" | 27 #include "ui/gfx/shadow_value.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool diagonal_strike); | 70 bool diagonal_strike); |
70 void DrawUnderline(int x, int y, int width); | 71 void DrawUnderline(int x, int y, int width); |
71 void DrawStrike(int x, int y, int width) const; | 72 void DrawStrike(int x, int y, int width) const; |
72 void DrawDiagonalStrike(int x, int y, int width) const; | 73 void DrawDiagonalStrike(int x, int y, int width) const; |
73 | 74 |
74 private: | 75 private: |
75 SkCanvas* canvas_skia_; | 76 SkCanvas* canvas_skia_; |
76 bool started_drawing_; | 77 bool started_drawing_; |
77 SkPaint paint_; | 78 SkPaint paint_; |
78 SkRect bounds_; | 79 SkRect bounds_; |
79 SkRefPtr<SkShader> deferred_fade_shader_; | 80 skia::RefPtr<SkShader> deferred_fade_shader_; |
80 SkScalar underline_thickness_; | 81 SkScalar underline_thickness_; |
81 SkScalar underline_position_; | 82 SkScalar underline_position_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(SkiaTextRenderer); | 84 DISALLOW_COPY_AND_ASSIGN(SkiaTextRenderer); |
84 }; | 85 }; |
85 | 86 |
86 // Internal helper class used by derived classes to iterate colors and styles. | 87 // Internal helper class used by derived classes to iterate colors and styles. |
87 class StyleIterator { | 88 class StyleIterator { |
88 public: | 89 public: |
89 StyleIterator(const BreakList<SkColor>& colors, | 90 StyleIterator(const BreakList<SkColor>& colors, |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 548 |
548 // Text shadows to be drawn. | 549 // Text shadows to be drawn. |
549 ShadowValues text_shadows_; | 550 ShadowValues text_shadows_; |
550 | 551 |
551 DISALLOW_COPY_AND_ASSIGN(RenderText); | 552 DISALLOW_COPY_AND_ASSIGN(RenderText); |
552 }; | 553 }; |
553 | 554 |
554 } // namespace gfx | 555 } // namespace gfx |
555 | 556 |
556 #endif // UI_GFX_RENDER_TEXT_H_ | 557 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |