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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: Created 4 years, 2 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, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 FontCache::fontCache()->invalidate(); 70 FontCache::fontCache()->invalidate();
71 } 71 }
72 72
73 static void fontCacheRegisteredFontsChangedNotificationCallback( 73 static void fontCacheRegisteredFontsChangedNotificationCallback(
74 CFNotificationCenterRef, 74 CFNotificationCenterRef,
75 void* observer, 75 void* observer,
76 CFStringRef name, 76 CFStringRef name,
77 const void*, 77 const void*,
78 CFDictionaryRef) { 78 CFDictionaryRef) {
79 ASSERT_UNUSED(observer, observer == FontCache::fontCache()); 79 DCHECK_EQ(observer, FontCache::fontCache());
80 ASSERT_UNUSED( 80 DCHECK(CFEqual(name, kCTFontManagerRegisteredFontsChangedNotification));
81 name, CFEqual(name, kCTFontManagerRegisteredFontsChangedNotification));
82 invalidateFontCache(); 81 invalidateFontCache();
83 } 82 }
84 83
85 static bool useHinting() { 84 static bool useHinting() {
86 // Enable hinting when subpixel font scaling is disabled or 85 // Enable hinting when subpixel font scaling is disabled or
87 // when running the set of standard non-subpixel layout tests, 86 // when running the set of standard non-subpixel layout tests,
88 // otherwise use subpixel glyph positioning. 87 // otherwise use subpixel glyph positioning.
89 return (LayoutTestSupport::isRunningLayoutTest() && 88 return (LayoutTestSupport::isRunningLayoutTest() &&
90 !LayoutTestSupport::isFontAntialiasingEnabledForTest()); 89 !LayoutTestSupport::isFontAntialiasingEnabledForTest());
91 } 90 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 std::unique_ptr<FontPlatformData> platformData = wrapUnique( 277 std::unique_ptr<FontPlatformData> platformData = wrapUnique(
279 new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, 278 new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic,
280 fontDescription.orientation())); 279 fontDescription.orientation()));
281 if (!platformData->typeface()) { 280 if (!platformData->typeface()) {
282 return nullptr; 281 return nullptr;
283 } 282 }
284 return platformData; 283 return platformData;
285 } 284 }
286 285
287 } // namespace blink 286 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698