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

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

Issue 924543004: adding baseline options for super/sub scripting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed debug prints; cleaned up comments Created 5 years, 9 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_mac.cc ('k') | ui/gfx/text_constants.h » ('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 <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"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 internal::SkiaTextRenderer::DrawDecorations( 156 internal::SkiaTextRenderer::DrawDecorations(
157 x, y, width, underline, strike, diagonal_strike); 157 x, y, width, underline, strike, diagonal_strike);
158 } 158 }
159 159
160 std::vector<TextLog> text_log_; 160 std::vector<TextLog> text_log_;
161 std::vector<DecorationLog> decoration_log_; 161 std::vector<DecorationLog> decoration_log_;
162 162
163 DISALLOW_COPY_AND_ASSIGN(TestSkiaTextRenderer); 163 DISALLOW_COPY_AND_ASSIGN(TestSkiaTextRenderer);
164 }; 164 };
165 165
166 // Given a buffer to test against, this can be used to test various areas of the
167 // rectangular buffer against a specific color value.
168 class TestRectangleBuffer {
169 public:
170 TestRectangleBuffer(const wchar_t* string,
171 const SkColor* buffer,
172 uint32_t stride,
173 uint32_t row_count)
174 : string_(string),
175 buffer_(buffer),
176 stride_(stride),
177 row_count_(row_count) {}
178
179 // Test if any values in the rectangular area are anything other than |color|.
180 void EnsureSolidRect(SkColor color,
181 int left,
182 int top,
183 int width,
184 int height) const {
185 ASSERT_LT(top, row_count_) << string_;
186 ASSERT_LE(top + height, row_count_) << string_;
187 ASSERT_LT(left, stride_) << string_;
188 ASSERT_LE(left + width, stride_) << string_ << ", left " << left
189 << ", width " << width << ", stride_ "
190 << stride_;
191 for (int y = top; y < top + height; ++y) {
192 for (int x = left; x < left + width; ++x) {
193 SkColor color = buffer_[x + y * stride_];
194 EXPECT_EQ(SK_ColorWHITE, color) << string_ << " at " << x << ", " << y;
195 }
196 }
197 }
198
199 protected:
msw 2015/02/27 22:05:15 nit: these could all be private, right?
dschuyler 2015/02/28 01:04:20 Done.
200 const wchar_t* string_;
201 const SkColor* buffer_;
202 int stride_;
203 int row_count_;
204
205 private:
206 DISALLOW_COPY_AND_ASSIGN(TestRectangleBuffer);
207 };
208
166 } // namespace 209 } // namespace
167 210
168 class RenderTextTest : public testing::Test { 211 class RenderTextTest : public testing::Test {
169 }; 212 };
170 213
171 TEST_F(RenderTextTest, DefaultStyle) { 214 TEST_F(RenderTextTest, DefaultStyle) {
172 // Check the default styles applied to new instances and adjusted text. 215 // Check the default styles applied to new instances and adjusted text.
173 scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); 216 scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
174 EXPECT_TRUE(render_text->text().empty()); 217 EXPECT_TRUE(render_text->text().empty());
175 const wchar_t* const cases[] = { kWeak, kLtr, L"Hello", kRtl, L"", L"" }; 218 const wchar_t* const cases[] = { kWeak, kLtr, L"Hello", kRtl, L"", L"" };
176 for (size_t i = 0; i < arraysize(cases); ++i) { 219 for (size_t i = 0; i < arraysize(cases); ++i) {
177 EXPECT_TRUE(render_text->colors().EqualsValueForTesting(SK_ColorBLACK)); 220 EXPECT_TRUE(render_text->colors().EqualsValueForTesting(SK_ColorBLACK));
221 EXPECT_TRUE(
222 render_text->baselines().EqualsValueForTesting(NORMAL_BASELINE));
178 for (size_t style = 0; style < NUM_TEXT_STYLES; ++style) 223 for (size_t style = 0; style < NUM_TEXT_STYLES; ++style)
179 EXPECT_TRUE(render_text->styles()[style].EqualsValueForTesting(false)); 224 EXPECT_TRUE(render_text->styles()[style].EqualsValueForTesting(false));
180 render_text->SetText(WideToUTF16(cases[i])); 225 render_text->SetText(WideToUTF16(cases[i]));
181 } 226 }
182 } 227 }
183 228
184 TEST_F(RenderTextTest, SetColorAndStyle) { 229 TEST_F(RenderTextTest, SetColorAndStyle) {
185 // Ensure custom default styles persist across setting and clearing text. 230 // Ensure custom default styles persist across setting and clearing text.
186 scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); 231 scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
187 const SkColor color = SK_ColorRED; 232 const SkColor color = SK_ColorRED;
188 render_text->SetColor(color); 233 render_text->SetColor(color);
234 render_text->SetBaselineStyle(SUPERSCRIPT);
189 render_text->SetStyle(BOLD, true); 235 render_text->SetStyle(BOLD, true);
190 render_text->SetStyle(UNDERLINE, false); 236 render_text->SetStyle(UNDERLINE, false);
191 const wchar_t* const cases[] = { kWeak, kLtr, L"Hello", kRtl, L"", L"" }; 237 const wchar_t* const cases[] = { kWeak, kLtr, L"Hello", kRtl, L"", L"" };
192 for (size_t i = 0; i < arraysize(cases); ++i) { 238 for (size_t i = 0; i < arraysize(cases); ++i) {
193 EXPECT_TRUE(render_text->colors().EqualsValueForTesting(color)); 239 EXPECT_TRUE(render_text->colors().EqualsValueForTesting(color));
240 EXPECT_TRUE(render_text->baselines().EqualsValueForTesting(SUPERSCRIPT));
194 EXPECT_TRUE(render_text->styles()[BOLD].EqualsValueForTesting(true)); 241 EXPECT_TRUE(render_text->styles()[BOLD].EqualsValueForTesting(true));
195 EXPECT_TRUE(render_text->styles()[UNDERLINE].EqualsValueForTesting(false)); 242 EXPECT_TRUE(render_text->styles()[UNDERLINE].EqualsValueForTesting(false));
196 render_text->SetText(WideToUTF16(cases[i])); 243 render_text->SetText(WideToUTF16(cases[i]));
197 244
198 // Ensure custom default styles can be applied after text has been set. 245 // Ensure custom default styles can be applied after text has been set.
199 if (i == 1) 246 if (i == 1)
200 render_text->SetStyle(STRIKE, true); 247 render_text->SetStyle(STRIKE, true);
201 if (i >= 1) 248 if (i >= 1)
202 EXPECT_TRUE(render_text->styles()[STRIKE].EqualsValueForTesting(true)); 249 EXPECT_TRUE(render_text->styles()[STRIKE].EqualsValueForTesting(true));
203 } 250 }
204 } 251 }
205 252
206 TEST_F(RenderTextTest, ApplyColorAndStyle) { 253 TEST_F(RenderTextTest, ApplyColorAndStyle) {
207 scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); 254 scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
208 render_text->SetText(ASCIIToUTF16("012345678")); 255 render_text->SetText(ASCIIToUTF16("012345678"));
209 256
210 // Apply a ranged color and style and check the resulting breaks. 257 // Apply a ranged color and style and check the resulting breaks.
211 render_text->ApplyColor(SK_ColorRED, Range(1, 4)); 258 render_text->ApplyColor(SK_ColorRED, Range(1, 4));
259 render_text->ApplyBaselineStyle(SUPERIOR, Range(2, 4));
212 render_text->ApplyStyle(BOLD, true, Range(2, 5)); 260 render_text->ApplyStyle(BOLD, true, Range(2, 5));
213 std::vector<std::pair<size_t, SkColor> > expected_color; 261 std::vector<std::pair<size_t, SkColor> > expected_color;
214 expected_color.push_back(std::pair<size_t, SkColor>(0, SK_ColorBLACK)); 262 expected_color.push_back(std::pair<size_t, SkColor>(0, SK_ColorBLACK));
215 expected_color.push_back(std::pair<size_t, SkColor>(1, SK_ColorRED)); 263 expected_color.push_back(std::pair<size_t, SkColor>(1, SK_ColorRED));
216 expected_color.push_back(std::pair<size_t, SkColor>(4, SK_ColorBLACK)); 264 expected_color.push_back(std::pair<size_t, SkColor>(4, SK_ColorBLACK));
217 EXPECT_TRUE(render_text->colors().EqualsForTesting(expected_color)); 265 EXPECT_TRUE(render_text->colors().EqualsForTesting(expected_color));
266 std::vector<std::pair<size_t, BaselineStyle>> expected_baseline_style;
267 expected_baseline_style.push_back(
268 std::pair<size_t, BaselineStyle>(0, NORMAL_BASELINE));
269 expected_baseline_style.push_back(
270 std::pair<size_t, BaselineStyle>(2, SUPERIOR));
271 expected_baseline_style.push_back(
272 std::pair<size_t, BaselineStyle>(4, NORMAL_BASELINE));
273 EXPECT_TRUE(
274 render_text->baselines().EqualsForTesting(expected_baseline_style));
218 std::vector<std::pair<size_t, bool> > expected_style; 275 std::vector<std::pair<size_t, bool> > expected_style;
219 expected_style.push_back(std::pair<size_t, bool>(0, false)); 276 expected_style.push_back(std::pair<size_t, bool>(0, false));
220 expected_style.push_back(std::pair<size_t, bool>(2, true)); 277 expected_style.push_back(std::pair<size_t, bool>(2, true));
221 expected_style.push_back(std::pair<size_t, bool>(5, false)); 278 expected_style.push_back(std::pair<size_t, bool>(5, false));
222 EXPECT_TRUE(render_text->styles()[BOLD].EqualsForTesting(expected_style)); 279 EXPECT_TRUE(render_text->styles()[BOLD].EqualsForTesting(expected_style));
223 280
224 // Ensure setting a color and style overrides the ranged colors and styles. 281 // Ensure setting a color, baseline, and style overrides the ranged colors,
282 // baseline, and styles.
225 render_text->SetColor(SK_ColorBLUE); 283 render_text->SetColor(SK_ColorBLUE);
226 EXPECT_TRUE(render_text->colors().EqualsValueForTesting(SK_ColorBLUE)); 284 EXPECT_TRUE(render_text->colors().EqualsValueForTesting(SK_ColorBLUE));
285 render_text->SetBaselineStyle(SUBSCRIPT);
286 EXPECT_TRUE(render_text->baselines().EqualsValueForTesting(SUBSCRIPT));
227 render_text->SetStyle(BOLD, false); 287 render_text->SetStyle(BOLD, false);
228 EXPECT_TRUE(render_text->styles()[BOLD].EqualsValueForTesting(false)); 288 EXPECT_TRUE(render_text->styles()[BOLD].EqualsValueForTesting(false));
229 289
230 // Apply a color and style over the text end and check the resulting breaks. 290 // Apply a color, baseline, and style over the text end and check the
231 // (INT_MAX should be used instead of the text length for the range end) 291 // resulting breaks (INT_MAX should be used instead of the text length for
292 // the range end)
232 const size_t text_length = render_text->text().length(); 293 const size_t text_length = render_text->text().length();
233 render_text->ApplyColor(SK_ColorRED, Range(0, text_length)); 294 render_text->ApplyColor(SK_ColorRED, Range(0, text_length));
295 render_text->ApplyBaselineStyle(SUPERIOR, Range(0, text_length));
234 render_text->ApplyStyle(BOLD, true, Range(2, text_length)); 296 render_text->ApplyStyle(BOLD, true, Range(2, text_length));
235 std::vector<std::pair<size_t, SkColor> > expected_color_end; 297 std::vector<std::pair<size_t, SkColor> > expected_color_end;
236 expected_color_end.push_back(std::pair<size_t, SkColor>(0, SK_ColorRED)); 298 expected_color_end.push_back(std::pair<size_t, SkColor>(0, SK_ColorRED));
237 EXPECT_TRUE(render_text->colors().EqualsForTesting(expected_color_end)); 299 EXPECT_TRUE(render_text->colors().EqualsForTesting(expected_color_end));
300 std::vector<std::pair<size_t, BaselineStyle>> expected_baseline_end;
301 expected_baseline_end.push_back(
302 std::pair<size_t, BaselineStyle>(0, SUPERIOR));
303 EXPECT_TRUE(render_text->baselines().EqualsForTesting(expected_baseline_end));
238 std::vector<std::pair<size_t, bool> > expected_style_end; 304 std::vector<std::pair<size_t, bool> > expected_style_end;
239 expected_style_end.push_back(std::pair<size_t, bool>(0, false)); 305 expected_style_end.push_back(std::pair<size_t, bool>(0, false));
240 expected_style_end.push_back(std::pair<size_t, bool>(2, true)); 306 expected_style_end.push_back(std::pair<size_t, bool>(2, true));
241 EXPECT_TRUE(render_text->styles()[BOLD].EqualsForTesting(expected_style_end)); 307 EXPECT_TRUE(render_text->styles()[BOLD].EqualsForTesting(expected_style_end));
242 308
243 // Ensure ranged values adjust to accommodate text length changes. 309 // Ensure ranged values adjust to accommodate text length changes.
244 render_text->ApplyStyle(ITALIC, true, Range(0, 2)); 310 render_text->ApplyStyle(ITALIC, true, Range(0, 2));
245 render_text->ApplyStyle(ITALIC, true, Range(3, 6)); 311 render_text->ApplyStyle(ITALIC, true, Range(3, 6));
246 render_text->ApplyStyle(ITALIC, true, Range(7, text_length)); 312 render_text->ApplyStyle(ITALIC, true, Range(7, text_length));
247 std::vector<std::pair<size_t, bool> > expected_italic; 313 std::vector<std::pair<size_t, bool> > expected_italic;
(...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2563 // Korean character "han". 2629 // Korean character "han".
2564 render_text.SetText(WideToUTF16(L"\xd55c")); 2630 render_text.SetText(WideToUTF16(L"\xd55c"));
2565 render_text.EnsureLayout(); 2631 render_text.EnsureLayout();
2566 internal::TextRunList* run_list = render_text.GetRunList(); 2632 internal::TextRunList* run_list = render_text.GetRunList();
2567 ASSERT_EQ(1U, run_list->size()); 2633 ASSERT_EQ(1U, run_list->size());
2568 EXPECT_EQ(0U, run_list->runs()[0]->CountMissingGlyphs()); 2634 EXPECT_EQ(0U, run_list->runs()[0]->CountMissingGlyphs());
2569 } 2635 }
2570 #endif // defined(OS_WIN) 2636 #endif // defined(OS_WIN)
2571 2637
2572 // Ensure that the width reported by RenderText is sufficient for drawing. Draws 2638 // Ensure that the width reported by RenderText is sufficient for drawing. Draws
2573 // to a canvas and checks whether any pixel beyond the width is colored. 2639 // to a canvas and checks whether any pixel beyond the bounding rectangle is
2640 // colored.
2574 TEST_F(RenderTextTest, TextDoesntClip) { 2641 TEST_F(RenderTextTest, TextDoesntClip) {
2575 const wchar_t* kTestStrings[] = { L"Save", L"Remove", L"TEST", L"W", L"WWW" }; 2642 const wchar_t* kTestStrings[] = {
2643 // TODO(mukai): Underscores draw outside GetStringSize; crbug.com/459812.
2644 // L"TEST_______",
2645 L"TEST some stuff",
2646 L"WWWWWWWWWW",
2647 L"gAXAXAXAXAXAXA",
2648 // TODO(mukai): A-Ring draws outside GetStringSize; crbug.com/459812.
2649 // L"g\x00C5X\x00C5X\x00C5X\x00C5X\x00C5X\x00C5X\x00C5",
2650 L"\x0647\x0654\x0647\x0654\x0647\x0654\x0647\x0654\x0645\x0631\x062D"
2651 L"\x0628\x0627"};
2576 const Size kCanvasSize(300, 50); 2652 const Size kCanvasSize(300, 50);
2577 const int kTestWidth = 10; 2653 const int kTestSize = 10;
2578 2654
2579 skia::RefPtr<SkSurface> surface = skia::AdoptRef( 2655 skia::RefPtr<SkSurface> surface = skia::AdoptRef(
2580 SkSurface::NewRasterN32Premul(kCanvasSize.width(), kCanvasSize.height())); 2656 SkSurface::NewRasterN32Premul(kCanvasSize.width(), kCanvasSize.height()));
2581 scoped_ptr<Canvas> canvas( 2657 scoped_ptr<Canvas> canvas(
2582 Canvas::CreateCanvasWithoutScaling(surface->getCanvas(), 1.0f)); 2658 Canvas::CreateCanvasWithoutScaling(surface->getCanvas(), 1.0f));
2583 scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); 2659 scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
2584 render_text->SetDisplayRect(Rect(kCanvasSize)); 2660 render_text->SetHorizontalAlignment(ALIGN_LEFT);
2585 render_text->SetHorizontalAlignment(gfx::ALIGN_LEFT);
2586 render_text->SetColor(SK_ColorBLACK); 2661 render_text->SetColor(SK_ColorBLACK);
2587 2662
2588 for (auto string : kTestStrings) { 2663 for (auto string : kTestStrings) {
2589 surface->getCanvas()->clear(SK_ColorWHITE); 2664 surface->getCanvas()->clear(SK_ColorWHITE);
2590 render_text->SetText(WideToUTF16(string)); 2665 render_text->SetText(WideToUTF16(string));
2666 const Size string_size = render_text->GetStringSize();
2667 render_text->ApplyBaselineStyle(SUPERSCRIPT, Range(1, 2));
2668 render_text->ApplyBaselineStyle(SUPERIOR, Range(3, 4));
2669 render_text->ApplyBaselineStyle(INFERIOR, Range(5, 6));
2670 render_text->ApplyBaselineStyle(SUBSCRIPT, Range(7, 8));
2591 render_text->SetStyle(BOLD, true); 2671 render_text->SetStyle(BOLD, true);
2672 render_text->SetDisplayRect(
2673 Rect(kTestSize, kTestSize, string_size.width(), string_size.height()));
2674 // Allow the RenderText to paint outside of its display rect.
2675 render_text->set_clip_to_display_rect(false);
2676 ASSERT_LE(string_size.width() + kTestSize * 2, kCanvasSize.width());
2677
2592 render_text->Draw(canvas.get()); 2678 render_text->Draw(canvas.get());
2593 int width = render_text->GetStringSize().width(); 2679 int width = string_size.width();
msw 2015/02/27 22:05:15 nit: remove |width|, just inline string_size.width
dschuyler 2015/02/28 01:04:20 Done.
2594 ASSERT_LT(width + kTestWidth, kCanvasSize.width()); 2680 ASSERT_LT(width + kTestSize, kCanvasSize.width());
2595 const uint32* buffer = static_cast<const uint32*>( 2681 const uint32* buffer =
2596 surface->peekPixels(NULL, NULL)); 2682 static_cast<const uint32*>(surface->peekPixels(nullptr, nullptr));
2597 ASSERT_NE(nullptr, buffer); 2683 ASSERT_NE(nullptr, buffer);
2598 2684 TestRectangleBuffer rect_buffer(string, buffer, kCanvasSize.width(),
2599 for (int y = 0; y < kCanvasSize.height(); ++y) { 2685 kCanvasSize.height());
2600 // Allow one column of anti-aliased pixels past the expected width. 2686 // Top side.
2601 SkColor color = buffer[width + y * kCanvasSize.width()]; 2687 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, 0, kCanvasSize.width(),
2602 EXPECT_LT(220U, color_utils::GetLuminanceForColor(color)) << string; 2688 kTestSize);
2603 for (int x = 1; x < kTestWidth; ++x) { 2689 // Bottom side.
2604 color = buffer[width + x + y * kCanvasSize.width()]; 2690 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0,
2605 EXPECT_EQ(SK_ColorWHITE, color) << string; 2691 kTestSize + string_size.height(),
2606 } 2692 kCanvasSize.width(), kTestSize);
2607 } 2693 // Left side.
2694 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize,
2695 string_size.height());
2696 // Right side.
2697 rect_buffer.EnsureSolidRect(SK_ColorWHITE, kTestSize + string_size.width(),
2698 kTestSize, kTestSize, string_size.height());
2608 } 2699 }
2609 } 2700 }
2610 2701
2702 // Ensure that the text will clip to the display rect. Draws to a canvas and
2703 // checks whether any pixel beyond the bounding rectangle is colored.
2704 TEST_F(RenderTextTest, TextDoesClip) {
2705 const wchar_t* kTestStrings[] = {L"TEST", L"W", L"WWWW", L"gAXAXWWWW"};
2706 const Size kCanvasSize(300, 50);
2707 const int kTestSize = 10;
2708
2709 skia::RefPtr<SkSurface> surface = skia::AdoptRef(
2710 SkSurface::NewRasterN32Premul(kCanvasSize.width(), kCanvasSize.height()));
2711 scoped_ptr<Canvas> canvas(
2712 Canvas::CreateCanvasWithoutScaling(surface->getCanvas(), 1.0f));
2713 scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
2714 render_text->SetHorizontalAlignment(ALIGN_LEFT);
2715 render_text->SetColor(SK_ColorBLACK);
2716
2717 for (auto string : kTestStrings) {
2718 surface->getCanvas()->clear(SK_ColorWHITE);
2719 render_text->SetText(WideToUTF16(string));
2720 const Size string_size = render_text->GetStringSize();
2721 int fake_width = string_size.width() / 2;
2722 int fake_height = string_size.height() / 2;
2723 render_text->SetDisplayRect(
2724 Rect(kTestSize, kTestSize, fake_width, fake_height));
2725 render_text->set_clip_to_display_rect(true);
2726 render_text->Draw(canvas.get());
2727 ASSERT_LT(string_size.width() + kTestSize, kCanvasSize.width());
2728 const uint32* buffer =
2729 static_cast<const uint32*>(surface->peekPixels(nullptr, nullptr));
2730 ASSERT_NE(nullptr, buffer);
2731 TestRectangleBuffer rect_buffer(string, buffer, kCanvasSize.width(),
2732 kCanvasSize.height());
2733 // Top side.
2734 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, 0, kCanvasSize.width(),
2735 kTestSize);
2736 // Bottom side.
2737 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize + fake_height,
2738 kCanvasSize.width(), kTestSize);
2739 // Left side.
2740 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize,
2741 fake_height);
2742 // Right side.
2743 rect_buffer.EnsureSolidRect(SK_ColorWHITE, kTestSize + fake_width,
2744 kTestSize, kTestSize, fake_height);
2745 }
2746 }
2747
2611 } // namespace gfx 2748 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_mac.cc ('k') | ui/gfx/text_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698