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

Side by Side Diff: src/ports/SkFontHost_mac.cpp

Issue 768133005: Remove support for OSX 10.5. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | 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 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifdef SK_BUILD_FOR_MAC 9 #ifdef SK_BUILD_FOR_MAC
10 #import <ApplicationServices/ApplicationServices.h> 10 #import <ApplicationServices/ApplicationServices.h>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 #include <sys/utsname.h> 190 #include <sys/utsname.h>
191 191
192 typedef uint32_t CGRGBPixel; 192 typedef uint32_t CGRGBPixel;
193 193
194 static unsigned CGRGBPixel_getAlpha(CGRGBPixel pixel) { 194 static unsigned CGRGBPixel_getAlpha(CGRGBPixel pixel) {
195 return pixel & 0xFF; 195 return pixel & 0xFF;
196 } 196 }
197 197
198 // The calls to support subpixel are present in 10.5, but are not included in
199 // the 10.5 SDK. The needed calls have been extracted from the 10.6 SDK and are
200 // included below. To verify that CGContextSetShouldSubpixelQuantizeFonts, for
201 // instance, is present in the 10.5 CoreGraphics libary, use:
202 // cd /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
203 // cd ApplicationServices.framework/Frameworks/CoreGraphics.framework/
204 // nm CoreGraphics | grep CGContextSetShouldSubpixelQuantizeFonts
205
206 #if !defined(MAC_OS_X_VERSION_10_6) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_ VERSION_10_6)
207 CG_EXTERN void CGContextSetAllowsFontSmoothing(CGContextRef context, bool value) ;
208 CG_EXTERN void CGContextSetAllowsFontSubpixelPositioning(CGContextRef context, b ool value);
209 CG_EXTERN void CGContextSetShouldSubpixelPositionFonts(CGContextRef context, boo l value);
210 CG_EXTERN void CGContextSetAllowsFontSubpixelQuantization(CGContextRef context, bool value);
211 CG_EXTERN void CGContextSetShouldSubpixelQuantizeFonts(CGContextRef context, boo l value);
212 #endif
213
214 static const char FONT_DEFAULT_NAME[] = "Lucida Sans"; 198 static const char FONT_DEFAULT_NAME[] = "Lucida Sans";
215 199
216 // See Source/WebKit/chromium/base/mac/mac_util.mm DarwinMajorVersionInternal fo r original source. 200 // See Source/WebKit/chromium/base/mac/mac_util.mm DarwinMajorVersionInternal fo r original source.
217 static int readVersion() { 201 static int readVersion() {
218 struct utsname info; 202 struct utsname info;
219 if (uname(&info) != 0) { 203 if (uname(&info) != 0) {
220 SkDebugf("uname failed\n"); 204 SkDebugf("uname failed\n");
221 return 0; 205 return 0;
222 } 206 }
223 if (strcmp(info.sysname, "Darwin") != 0) { 207 if (strcmp(info.sysname, "Darwin") != 0) {
(...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 } 2211 }
2228 return face; 2212 return face;
2229 } 2213 }
2230 }; 2214 };
2231 2215
2232 /////////////////////////////////////////////////////////////////////////////// 2216 ///////////////////////////////////////////////////////////////////////////////
2233 2217
2234 SkFontMgr* SkFontMgr::Factory() { 2218 SkFontMgr* SkFontMgr::Factory() {
2235 return SkNEW(SkFontMgr_Mac); 2219 return SkNEW(SkFontMgr_Mac);
2236 } 2220 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698