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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/win/FontPlatformDataWin.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // they tend to get quite blurry at non-integer sizes and positions. 66 // they tend to get quite blurry at non-integer sizes and positions.
67 // For high-DPI this workaround isn't required. 67 // For high-DPI this workaround isn't required.
68 if ((ts >= m_minSizeForSubpixel || 68 if ((ts >= m_minSizeForSubpixel ||
69 FontCache::fontCache()->deviceScaleFactor() >= 1.5) 69 FontCache::fontCache()->deviceScaleFactor() >= 1.5)
70 70
71 // Subpixel text positioning looks pretty bad without font 71 // Subpixel text positioning looks pretty bad without font
72 // smoothing. Disable it unless some type of font smoothing is used. 72 // smoothing. Disable it unless some type of font smoothing is used.
73 // As most tests run without font smoothing we enable it for tests 73 // As most tests run without font smoothing we enable it for tests
74 // to ensure we get good test coverage matching the more common 74 // to ensure we get good test coverage matching the more common
75 // smoothing enabled behavior. 75 // smoothing enabled behavior.
76 && ((textFlags & SkPaint::kAntiAlias_Flag) || 76 &&
77 LayoutTestSupport::isRunningLayoutTest())) 77 ((textFlags & SkPaint::kAntiAlias_Flag) ||
78 LayoutTestSupport::isRunningLayoutTest()))
78 flags |= SkPaint::kSubpixelText_Flag; 79 flags |= SkPaint::kSubpixelText_Flag;
79 80
80 SkASSERT(!(textFlags & ~textFlagsMask)); 81 SkASSERT(!(textFlags & ~textFlagsMask));
81 flags |= textFlags; 82 flags |= textFlags;
82 } 83 }
83 84
84 paint->setFlags(flags); 85 paint->setFlags(flags);
85 } 86 }
86 87
87 static bool isWebFont(const String& familyName) { 88 static bool isWebFont(const String& familyName) {
(...skipping 26 matching lines...) Expand all
114 textFlags |= SkPaint::kAntiAlias_Flag; 115 textFlags |= SkPaint::kAntiAlias_Flag;
115 116
116 return textFlags; 117 return textFlags;
117 } 118 }
118 119
119 void FontPlatformData::querySystemForRenderStyle() { 120 void FontPlatformData::querySystemForRenderStyle() {
120 m_paintTextFlags = computePaintTextFlags(fontFamilyName()); 121 m_paintTextFlags = computePaintTextFlags(fontFamilyName());
121 } 122 }
122 123
123 } // namespace blink 124 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698