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

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

Issue 1871743003: ui: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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.h ('k') | ui/gl/gl_surface_overlay.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_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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 RenderTextMac::TextRun::TextRun() 231 RenderTextMac::TextRun::TextRun()
232 : ct_run(NULL), 232 : ct_run(NULL),
233 origin(SkPoint::Make(0, 0)), 233 origin(SkPoint::Make(0, 0)),
234 width(0), 234 width(0),
235 foreground(SK_ColorBLACK), 235 foreground(SK_ColorBLACK),
236 underline(false), 236 underline(false),
237 strike(false), 237 strike(false),
238 diagonal_strike(false) {} 238 diagonal_strike(false) {}
239 239
240 RenderTextMac::TextRun::TextRun(const TextRun& other) = default;
241
240 RenderTextMac::TextRun::~TextRun() {} 242 RenderTextMac::TextRun::~TextRun() {}
241 243
242 float RenderTextMac::GetLayoutTextWidth() { 244 float RenderTextMac::GetLayoutTextWidth() {
243 base::ScopedCFTypeRef<CFMutableArrayRef> attributes_owner; 245 base::ScopedCFTypeRef<CFMutableArrayRef> attributes_owner;
244 base::ScopedCFTypeRef<CTLineRef> line( 246 base::ScopedCFTypeRef<CTLineRef> line(
245 EnsureLayoutInternal(layout_text(), &attributes_owner)); 247 EnsureLayoutInternal(layout_text(), &attributes_owner));
246 SkScalar baseline; 248 SkScalar baseline;
247 return GetCTLineSize(line.get(), &baseline).width(); 249 return GetCTLineSize(line.get(), &baseline).width();
248 } 250 }
249 251
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 435 }
434 436
435 void RenderTextMac::InvalidateStyle() { 437 void RenderTextMac::InvalidateStyle() {
436 line_.reset(); 438 line_.reset();
437 attributes_.reset(); 439 attributes_.reset();
438 runs_.clear(); 440 runs_.clear();
439 runs_valid_ = false; 441 runs_valid_ = false;
440 } 442 }
441 443
442 } // namespace gfx 444 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_mac.h ('k') | ui/gl/gl_surface_overlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698