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

Side by Side Diff: Source/platform/fonts/mac/SimpleFontDataMac.mm

Issue 516953003: Removing "using" declarations that import names in the C++ Standard library.(Source/platform/[fonts… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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) 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Alexey Proskuryakov 3 * Copyright (C) 2006 Alexey Proskuryakov
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (!font) 70 if (!font)
71 return kCGFontRenderingModeAntialiasedPixelAligned; 71 return kCGFontRenderingModeAntialiasedPixelAligned;
72 72
73 switch ([font renderingMode]) { 73 switch ([font renderingMode]) {
74 case NSFontIntegerAdvancementsRenderingMode: return kCGFontRenderingMode 1BitPixelAligned; 74 case NSFontIntegerAdvancementsRenderingMode: return kCGFontRenderingMode 1BitPixelAligned;
75 case NSFontAntialiasedIntegerAdvancementsRenderingMode: return kCGFontRe nderingModeAntialiasedPixelAligned; 75 case NSFontAntialiasedIntegerAdvancementsRenderingMode: return kCGFontRe nderingModeAntialiasedPixelAligned;
76 default: return kCGFontRenderingModeAntialiased; 76 default: return kCGFontRenderingModeAntialiased;
77 } 77 }
78 } 78 }
79 79
80 using namespace std;
81
82 namespace blink { 80 namespace blink {
83 81
84 static bool fontHasVerticalGlyphs(CTFontRef ctFont) 82 static bool fontHasVerticalGlyphs(CTFontRef ctFont)
85 { 83 {
86 // The check doesn't look neat but this is what AppKit does for vertical wri ting... 84 // The check doesn't look neat but this is what AppKit does for vertical wri ting...
87 RetainPtr<CFArrayRef> tableTags(AdoptCF, CTFontCopyAvailableTables(ctFont, k CTFontTableOptionNoOptions)); 85 RetainPtr<CFArrayRef> tableTags(AdoptCF, CTFontCopyAvailableTables(ctFont, k CTFontTableOptionNoOptions));
88 CFIndex numTables = CFArrayGetCount(tableTags.get()); 86 CFIndex numTables = CFArrayGetCount(tableTags.get());
89 for (CFIndex index = 0; index < numTables; ++index) { 87 for (CFIndex index = 0; index < numTables; ++index) {
90 CTFontTableTag tag = (CTFontTableTag)(uintptr_t)CFArrayGetValueAtIndex(t ableTags.get(), index); 88 CTFontTableTag tag = (CTFontTableTag)(uintptr_t)CFArrayGetValueAtIndex(t ableTags.get(), index);
91 if (tag == kCTFontTableVhea || tag == kCTFontTableVORG) 89 if (tag == kCTFontTableVhea || tag == kCTFontTableVORG)
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 RetainPtr<CGFontRef> runCGFont(AdoptCF, CTFontCopyGraphicsFont(runFont, 0)); 445 RetainPtr<CGFontRef> runCGFont(AdoptCF, CTFontCopyGraphicsFont(runFont, 0));
448 if (!CFEqual(runCGFont.get(), cgFont.get())) 446 if (!CFEqual(runCGFont.get(), cgFont.get()))
449 return false; 447 return false;
450 } 448 }
451 449
452 addResult.storedValue->value = true; 450 addResult.storedValue->value = true;
453 return true; 451 return true;
454 } 452 }
455 453
456 } // namespace blink 454 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698