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

Unified Diff: plugin/mac/graphics_utils_mac.mm

Issue 577038: O3D Mac: Add CoreAnimation support (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « plugin/mac/graphics_utils_mac.h ('k') | plugin/mac/main_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: plugin/mac/graphics_utils_mac.mm
===================================================================
--- plugin/mac/graphics_utils_mac.mm (revision 44394)
+++ plugin/mac/graphics_utils_mac.mm (working copy)
@@ -82,8 +82,24 @@
}
return result;
}
+
+// Returns whether OS is 10.6 (Snow Leopard) or higher.
+bool IsMacOSTenSixOrHigher() {
+ static bool isCached = false, result = false;
+
+ if (!isCached) {
+ SInt32 major = 0;
+ SInt32 minor = 0;
+ // These selectors don't exist pre 10.4 but as we check the error
+ // the function will correctly return NO which is the right answer.
+ result = ((::Gestalt(gestaltSystemVersionMajor, &major) == noErr) &&
+ (::Gestalt(gestaltSystemVersionMinor, &minor) == noErr) &&
+ ((major > 10) || (major == 10 && minor >= 6)));
+ isCached = true;
+ }
+ return result;
+}
-
Rect CGRect2Rect(const CGRect &inRect) {
Rect outRect;
outRect.left = inRect.origin.x;
« no previous file with comments | « plugin/mac/graphics_utils_mac.h ('k') | plugin/mac/main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698