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

Side by Side Diff: ui/gfx/render_text_mac.mm

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_harfbuzz.cc ('k') | no next file » | 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_mac.h" 5 #include "ui/gfx/render_text_mac.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #include <CoreText/CoreText.h> 9 #include <CoreText/CoreText.h>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 font_list().GetPrimaryFont().GetFontRenderParams(), 214 font_list().GetPrimaryFont().GetFontRenderParams(),
215 subpixel_rendering_suppressed()); 215 subpixel_rendering_suppressed());
216 216
217 for (size_t i = 0; i < runs_.size(); ++i) { 217 for (size_t i = 0; i < runs_.size(); ++i) {
218 const TextRun& run = runs_[i]; 218 const TextRun& run = runs_[i];
219 renderer->SetForegroundColor(run.foreground); 219 renderer->SetForegroundColor(run.foreground);
220 renderer->SetTextSize(CTFontGetSize(run.ct_font)); 220 renderer->SetTextSize(CTFontGetSize(run.ct_font));
221 221
222 // The painter adds its own ref. So don't |release()| it from the ref ptr in 222 // The painter adds its own ref. So don't |release()| it from the ref ptr in
223 // TextRun. 223 // TextRun.
224 renderer->SetTypeface(run.typeface.get()); 224 renderer->SetTypeface(run.typeface);
225 225
226 renderer->DrawPosText(&run.glyph_positions[0], &run.glyphs[0], 226 renderer->DrawPosText(&run.glyph_positions[0], &run.glyphs[0],
227 run.glyphs.size()); 227 run.glyphs.size());
228 renderer->DrawDecorations(run.origin.x(), run.origin.y(), run.width, 228 renderer->DrawDecorations(run.origin.x(), run.origin.y(), run.width,
229 run.underline, run.strike, run.diagonal_strike); 229 run.underline, run.strike, run.diagonal_strike);
230 } 230 }
231 231
232 renderer->EndDiagonalStrike(); 232 renderer->EndDiagonalStrike();
233 } 233 }
234 234
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 443
444 void RenderTextMac::InvalidateStyle() { 444 void RenderTextMac::InvalidateStyle() {
445 line_.reset(); 445 line_.reset();
446 attributes_.reset(); 446 attributes_.reset();
447 runs_.clear(); 447 runs_.clear();
448 runs_valid_ = false; 448 runs_valid_ = false;
449 } 449 }
450 450
451 } // namespace gfx 451 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_harfbuzz.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698