| 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 #include "ui/gfx/render_text.h" | 5 #include "ui/gfx/render_text.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/i18n/break_iterator.h" | 10 #include "base/i18n/break_iterator.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "third_party/skia/include/core/SkSurface.h" | 17 #include "third_party/skia/include/core/SkSurface.h" |
| 18 #include "ui/gfx/break_list.h" | 18 #include "ui/gfx/break_list.h" |
| 19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
| 20 #include "ui/gfx/color_utils.h" | 20 #include "ui/gfx/color_utils.h" |
| 21 #include "ui/gfx/font.h" | 21 #include "ui/gfx/font.h" |
| 22 #include "ui/gfx/geometry/point_f.h" |
| 22 #include "ui/gfx/range/range.h" | 23 #include "ui/gfx/range/range.h" |
| 23 #include "ui/gfx/range/range_f.h" | 24 #include "ui/gfx/range/range_f.h" |
| 24 #include "ui/gfx/render_text_harfbuzz.h" | 25 #include "ui/gfx/render_text_harfbuzz.h" |
| 25 #include "ui/gfx/text_utils.h" | 26 #include "ui/gfx/text_utils.h" |
| 26 | 27 |
| 27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 28 #include "base/win/windows_version.h" | 29 #include "base/win/windows_version.h" |
| 29 #include "ui/gfx/platform_font_win.h" | 30 #include "ui/gfx/platform_font_win.h" |
| 30 #endif | 31 #endif |
| 31 | 32 |
| (...skipping 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3191 backend[i]->SetColor(SK_ColorRED); | 3192 backend[i]->SetColor(SK_ColorRED); |
| 3192 test_api.DrawVisualText(&renderer); | 3193 test_api.DrawVisualText(&renderer); |
| 3193 | 3194 |
| 3194 renderer.GetTextLogAndReset(&text_log); | 3195 renderer.GetTextLogAndReset(&text_log); |
| 3195 EXPECT_EQ(1u, text_log.size()); | 3196 EXPECT_EQ(1u, text_log.size()); |
| 3196 EXPECT_EQ(SK_ColorRED, text_log[0].color); | 3197 EXPECT_EQ(SK_ColorRED, text_log[0].color); |
| 3197 } | 3198 } |
| 3198 } | 3199 } |
| 3199 | 3200 |
| 3200 } // namespace gfx | 3201 } // namespace gfx |
| OLD | NEW |