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

Unified Diff: content/browser/renderer_host/backing_store_mac.mm

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | « chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm ('k') | content/common/sandbox_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/backing_store_mac.mm
===================================================================
--- content/browser/renderer_host/backing_store_mac.mm (revision 88826)
+++ content/browser/renderer_host/backing_store_mac.mm (working copy)
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/sys_info.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
@@ -26,19 +25,6 @@
// allows acclerated drawing into the layer and lets scrolling and such happen
// all or mostly on the GPU, which is good for performance.
-namespace {
-
-// Returns whether this version of OS X has broken CGLayers, see
-// http://crbug.com/45553 , comments 5 and 6.
-bool NeedsLayerWorkaround() {
- int32 os_major, os_minor, os_bugfix;
- base::SysInfo::OperatingSystemVersionNumbers(
- &os_major, &os_minor, &os_bugfix);
- return os_major == 10 && os_minor == 5;
-}
-
-} // namespace
-
BackingStoreMac::BackingStoreMac(RenderWidgetHost* widget,
const gfx::Size& size)
: BackingStore(widget, size) {
@@ -155,8 +141,9 @@
if ((dx || dy) && abs(dx) < size().width() && abs(dy) < size().height()) {
if (cg_layer()) {
- // See http://crbug.com/45553 , comments 5 and 6.
- static bool needs_layer_workaround = NeedsLayerWorkaround();
+ // Whether this version of OS X has broken CGLayers. See
+ // http://crbug.com/45553 , comments 5 and 6.
+ bool needs_layer_workaround = base::mac::IsOSLeopardOrEarlier();
base::mac::ScopedCFTypeRef<CGLayerRef> new_layer;
CGContextRef layer;
« no previous file with comments | « chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm ('k') | content/common/sandbox_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698