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

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

Issue 2066323002: Remove SK_SUPPORT_LEGACY_TYPEFACE_PTR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Mac fixes Created 4 years, 6 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.h ('k') | ui/gfx/render_text_harfbuzz.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 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <climits> 10 #include <climits>
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 void SkiaTextRenderer::SetDrawLooper(sk_sp<SkDrawLooper> draw_looper) { 234 void SkiaTextRenderer::SetDrawLooper(sk_sp<SkDrawLooper> draw_looper) {
235 paint_.setLooper(std::move(draw_looper)); 235 paint_.setLooper(std::move(draw_looper));
236 } 236 }
237 237
238 void SkiaTextRenderer::SetFontRenderParams(const FontRenderParams& params, 238 void SkiaTextRenderer::SetFontRenderParams(const FontRenderParams& params,
239 bool subpixel_rendering_suppressed) { 239 bool subpixel_rendering_suppressed) {
240 ApplyRenderParams(params, subpixel_rendering_suppressed, &paint_); 240 ApplyRenderParams(params, subpixel_rendering_suppressed, &paint_);
241 } 241 }
242 242
243 void SkiaTextRenderer::SetTypeface(SkTypeface* typeface) { 243 void SkiaTextRenderer::SetTypeface(sk_sp<SkTypeface> typeface) {
244 paint_.setTypeface(typeface); 244 paint_.setTypeface(std::move(typeface));
245 } 245 }
246 246
247 void SkiaTextRenderer::SetTextSize(SkScalar size) { 247 void SkiaTextRenderer::SetTextSize(SkScalar size) {
248 paint_.setTextSize(size); 248 paint_.setTextSize(size);
249 } 249 }
250 250
251 void SkiaTextRenderer::SetForegroundColor(SkColor foreground) { 251 void SkiaTextRenderer::SetForegroundColor(SkColor foreground) {
252 paint_.setColor(foreground); 252 paint_.setColor(foreground);
253 } 253 }
254 254
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 1587
1588 SetDisplayOffset(display_offset_.x() + delta_x); 1588 SetDisplayOffset(display_offset_.x() + delta_x);
1589 } 1589 }
1590 1590
1591 void RenderText::DrawSelection(Canvas* canvas) { 1591 void RenderText::DrawSelection(Canvas* canvas) {
1592 for (const Rect& s : GetSubstringBounds(selection())) 1592 for (const Rect& s : GetSubstringBounds(selection()))
1593 canvas->FillRect(s, selection_background_focused_color_); 1593 canvas->FillRect(s, selection_background_focused_color_);
1594 } 1594 }
1595 1595
1596 } // namespace gfx 1596 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698