Chromium Code Reviews| 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 <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 for (size_t i = 1U; i < glyph_count; ++i) { | 373 for (size_t i = 1U; i < glyph_count; ++i) { |
| 374 log_entry.origin.SetToMin( | 374 log_entry.origin.SetToMin( |
| 375 PointF(SkScalarToFloat(pos[i].x()), SkScalarToFloat(pos[i].y()))); | 375 PointF(SkScalarToFloat(pos[i].x()), SkScalarToFloat(pos[i].y()))); |
| 376 } | 376 } |
| 377 } | 377 } |
| 378 log_entry.color = | 378 log_entry.color = |
| 379 test::RenderTextTestApi::GetRendererPaint(this).getColor(); | 379 test::RenderTextTestApi::GetRendererPaint(this).getColor(); |
| 380 text_log_.push_back(log_entry); | 380 text_log_.push_back(log_entry); |
| 381 internal::SkiaTextRenderer::DrawPosText(pos, glyphs, glyph_count); | 381 internal::SkiaTextRenderer::DrawPosText(pos, glyphs, glyph_count); |
| 382 } | 382 } |
| 383 | 383 |
|
cjgrant
2017/07/05 16:16:48
This was also unused I believe.
msw
2017/07/05 19:55:00
Acknowledged; please also remove |decoration_log_|
cjgrant
2017/07/05 20:44:43
Done (with the associated struct as well).
| |
| 384 void DrawDecorations(int x, | |
| 385 int y, | |
| 386 int width, | |
| 387 bool underline, | |
| 388 bool strike) override { | |
| 389 decoration_log_.push_back(DecorationLog(x, y, width, underline, strike)); | |
| 390 internal::SkiaTextRenderer::DrawDecorations(x, y, width, underline, strike); | |
| 391 } | |
| 392 | |
| 393 std::vector<TextLog> text_log_; | 384 std::vector<TextLog> text_log_; |
| 394 std::vector<DecorationLog> decoration_log_; | 385 std::vector<DecorationLog> decoration_log_; |
| 395 | 386 |
| 396 DISALLOW_COPY_AND_ASSIGN(TestSkiaTextRenderer); | 387 DISALLOW_COPY_AND_ASSIGN(TestSkiaTextRenderer); |
| 397 }; | 388 }; |
| 398 | 389 |
| 399 // Given a buffer to test against, this can be used to test various areas of the | 390 // Given a buffer to test against, this can be used to test various areas of the |
| 400 // rectangular buffer against a specific color value. | 391 // rectangular buffer against a specific color value. |
| 401 class TestRectangleBuffer { | 392 class TestRectangleBuffer { |
| 402 public: | 393 public: |
| (...skipping 4262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4665 ::testing::Values(RENDER_TEXT_HARFBUZZ), | 4656 ::testing::Values(RENDER_TEXT_HARFBUZZ), |
| 4666 PrintRenderTextBackend()); | 4657 PrintRenderTextBackend()); |
| 4667 #endif | 4658 #endif |
| 4668 | 4659 |
| 4669 INSTANTIATE_TEST_CASE_P(, | 4660 INSTANTIATE_TEST_CASE_P(, |
| 4670 RenderTextHarfBuzzTest, | 4661 RenderTextHarfBuzzTest, |
| 4671 ::testing::Values(RENDER_TEXT_HARFBUZZ), | 4662 ::testing::Values(RENDER_TEXT_HARFBUZZ), |
| 4672 PrintRenderTextBackend()); | 4663 PrintRenderTextBackend()); |
| 4673 | 4664 |
| 4674 } // namespace gfx | 4665 } // namespace gfx |
| OLD | NEW |