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

Side by Side Diff: plugin/mac/graphics_utils_mac.mm

Issue 3083012: Tidying up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « plugin/cross/plugin_metrics.h ('k') | plugin/mac/o3d_layer.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 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 SInt32 minor = 0; 75 SInt32 minor = 0;
76 // These selectors don't exist pre 10.4 but as we check the error 76 // These selectors don't exist pre 10.4 but as we check the error
77 // the function will correctly return NO which is the right answer. 77 // the function will correctly return NO which is the right answer.
78 result = ((::Gestalt(gestaltSystemVersionMajor, &major) == noErr) && 78 result = ((::Gestalt(gestaltSystemVersionMajor, &major) == noErr) &&
79 (::Gestalt(gestaltSystemVersionMinor, &minor) == noErr) && 79 (::Gestalt(gestaltSystemVersionMinor, &minor) == noErr) &&
80 ((major > 10) || (major == 10 && minor >= 5))); 80 ((major > 10) || (major == 10 && minor >= 5)));
81 isCached = true; 81 isCached = true;
82 } 82 }
83 return result; 83 return result;
84 } 84 }
85 85
86 // Returns whether OS is 10.6 (Snow Leopard) or higher. 86 // Returns whether OS is 10.6 (Snow Leopard) or higher.
87 bool IsMacOSTenSixOrHigher() { 87 bool IsMacOSTenSixOrHigher() {
88 static bool isCached = false, result = false; 88 static bool isCached = false, result = false;
89 89
90 if (!isCached) { 90 if (!isCached) {
91 SInt32 major = 0; 91 SInt32 major = 0;
92 SInt32 minor = 0; 92 SInt32 minor = 0;
93 // These selectors don't exist pre 10.4 but as we check the error 93 // These selectors don't exist pre 10.4 but as we check the error
94 // the function will correctly return NO which is the right answer. 94 // the function will correctly return NO which is the right answer.
95 result = ((::Gestalt(gestaltSystemVersionMajor, &major) == noErr) && 95 result = ((::Gestalt(gestaltSystemVersionMajor, &major) == noErr) &&
96 (::Gestalt(gestaltSystemVersionMinor, &minor) == noErr) && 96 (::Gestalt(gestaltSystemVersionMinor, &minor) == noErr) &&
97 ((major > 10) || (major == 10 && minor >= 6))); 97 ((major > 10) || (major == 10 && minor >= 6)));
98 isCached = true; 98 isCached = true;
99 } 99 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 CGContextAddArcToPoint(context, lx, ty, lx, cy, radius); 141 CGContextAddArcToPoint(context, lx, ty, lx, cy, radius);
142 CGContextClosePath(context); 142 CGContextClosePath(context);
143 143
144 if (fill) 144 if (fill)
145 CGContextFillPath(context); 145 CGContextFillPath(context);
146 else 146 else
147 CGContextStrokePath(context); 147 CGContextStrokePath(context);
148 } 148 }
149 149
150 } // namespace o3d 150 } // namespace o3d
OLDNEW
« no previous file with comments | « plugin/cross/plugin_metrics.h ('k') | plugin/mac/o3d_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698