| 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_MAC_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_MAC_H_ |
| 6 #define UI_GFX_RENDER_TEXT_MAC_H_ | 6 #define UI_GFX_RENDER_TEXT_MAC_H_ |
| 7 | 7 |
| 8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 size_t TextIndexToDisplayIndex(size_t index) override; | 53 size_t TextIndexToDisplayIndex(size_t index) override; |
| 54 size_t DisplayIndexToTextIndex(size_t index) override; | 54 size_t DisplayIndexToTextIndex(size_t index) override; |
| 55 bool IsValidCursorIndex(size_t index) override; | 55 bool IsValidCursorIndex(size_t index) override; |
| 56 void OnLayoutTextAttributeChanged(bool text_changed) override; | 56 void OnLayoutTextAttributeChanged(bool text_changed) override; |
| 57 void OnDisplayTextAttributeChanged() override; | 57 void OnDisplayTextAttributeChanged() override; |
| 58 void OnTextColorChanged() override; | 58 void OnTextColorChanged() override; |
| 59 void EnsureLayout() override; | 59 void EnsureLayout() override; |
| 60 void DrawVisualText(internal::SkiaTextRenderer* renderer) override; | 60 void DrawVisualText(internal::SkiaTextRenderer* renderer) override; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Mac_ElidedText); | 63 FRIEND_TEST_ALL_PREFIXES(RenderTextMacTest, Mac_ElidedText); |
| 64 | 64 |
| 65 struct TextRun { | 65 struct TextRun { |
| 66 CTRunRef ct_run; | 66 CTRunRef ct_run; |
| 67 SkPoint origin; | 67 SkPoint origin; |
| 68 std::vector<uint16_t> glyphs; | 68 std::vector<uint16_t> glyphs; |
| 69 std::vector<SkPoint> glyph_positions; | 69 std::vector<SkPoint> glyph_positions; |
| 70 SkScalar width; | 70 SkScalar width; |
| 71 base::ScopedCFTypeRef<CTFontRef> ct_font; | 71 base::ScopedCFTypeRef<CTFontRef> ct_font; |
| 72 sk_sp<SkTypeface> typeface; | 72 sk_sp<SkTypeface> typeface; |
| 73 SkColor foreground; | 73 SkColor foreground; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // Indicates that |runs_| are valid, set by |ComputeRuns()|. | 129 // Indicates that |runs_| are valid, set by |ComputeRuns()|. |
| 130 bool runs_valid_; | 130 bool runs_valid_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(RenderTextMac); | 132 DISALLOW_COPY_AND_ASSIGN(RenderTextMac); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace gfx | 135 } // namespace gfx |
| 136 | 136 |
| 137 #endif // UI_GFX_RENDER_TEXT_MAC_H_ | 137 #endif // UI_GFX_RENDER_TEXT_MAC_H_ |
| OLD | NEW |