Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: ui/gfx/render_text_unittest.cc

Issue 2680943002: ui: Clean up naming of paint-related identifiers (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 using base::WideToUTF16; 55 using base::WideToUTF16;
56 using base::WideToUTF8; 56 using base::WideToUTF8;
57 57
58 namespace gfx { 58 namespace gfx {
59 namespace test { 59 namespace test {
60 60
61 class RenderTextTestApi { 61 class RenderTextTestApi {
62 public: 62 public:
63 RenderTextTestApi(RenderText* render_text) : render_text_(render_text) {} 63 RenderTextTestApi(RenderText* render_text) : render_text_(render_text) {}
64 64
65 static SkPaint& GetRendererPaint(internal::SkiaTextRenderer* renderer) { 65 static cc::PaintFlags& GetRendererPaint(
66 return renderer->paint_; 66 internal::SkiaTextRenderer* renderer) {
67 return renderer->flags_;
67 } 68 }
68 69
69 // Callers should ensure that the associated RenderText object is a 70 // Callers should ensure that the associated RenderText object is a
70 // RenderTextHarfBuzz instance. 71 // RenderTextHarfBuzz instance.
71 internal::TextRunList* GetHarfBuzzRunList() { 72 internal::TextRunList* GetHarfBuzzRunList() {
72 RenderTextHarfBuzz* render_text = 73 RenderTextHarfBuzz* render_text =
73 static_cast<RenderTextHarfBuzz*>(render_text_); 74 static_cast<RenderTextHarfBuzz*>(render_text_);
74 return render_text->GetRunList(); 75 return render_text->GetRunList();
75 } 76 }
76 77
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 #if defined(OS_MACOSX) 437 #if defined(OS_MACOSX)
437 return base::MakeUnique<RenderTextMac>(); 438 return base::MakeUnique<RenderTextMac>();
438 #else 439 #else
439 break; 440 break;
440 #endif 441 #endif
441 } 442 }
442 NOTREACHED(); 443 NOTREACHED();
443 return nullptr; 444 return nullptr;
444 } 445 }
445 446
446 SkPaint& GetRendererPaint() { 447 cc::PaintFlags& GetRendererPaint() {
447 return test::RenderTextTestApi::GetRendererPaint(renderer()); 448 return test::RenderTextTestApi::GetRendererPaint(renderer());
448 } 449 }
449 450
450 void DrawVisualText() { test_api_->DrawVisualText(renderer()); } 451 void DrawVisualText() { test_api_->DrawVisualText(renderer()); }
451 452
452 internal::TextRunList* GetHarfBuzzRunList() { 453 internal::TextRunList* GetHarfBuzzRunList() {
453 DCHECK_EQ(RENDER_TEXT_HARFBUZZ, GetParam()); 454 DCHECK_EQ(RENDER_TEXT_HARFBUZZ, GetParam());
454 return test_api_->GetHarfBuzzRunList(); 455 return test_api_->GetHarfBuzzRunList();
455 } 456 }
456 457
(...skipping 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 ::testing::Values(RENDER_TEXT_HARFBUZZ), 4444 ::testing::Values(RENDER_TEXT_HARFBUZZ),
4444 PrintRenderTextBackend()); 4445 PrintRenderTextBackend());
4445 #endif 4446 #endif
4446 4447
4447 INSTANTIATE_TEST_CASE_P(, 4448 INSTANTIATE_TEST_CASE_P(,
4448 RenderTextHarfBuzzTest, 4449 RenderTextHarfBuzzTest,
4449 ::testing::Values(RENDER_TEXT_HARFBUZZ), 4450 ::testing::Values(RENDER_TEXT_HARFBUZZ),
4450 PrintRenderTextBackend()); 4451 PrintRenderTextBackend());
4451 4452
4452 } // namespace gfx 4453 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698