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

Unified Diff: ui/base/cocoa/remote_layer_api.mm

Issue 474723002: Enable remote CoreAnimation API by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_flag
Patch Set: Add OS version check Created 6 years, 2 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 | « content/browser/gpu/gpu_process_host.cc ('k') | ui/base/ui_base_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/remote_layer_api.mm
diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm
index 0fb1fdff4804ee0a9b5559e6960bf81ea1d2a990..839daa1c7d5a8b7f6604be578529e483618c6bfb 100644
--- a/ui/base/cocoa/remote_layer_api.mm
+++ b/ui/base/cocoa/remote_layer_api.mm
@@ -5,6 +5,7 @@
#include "ui/base/cocoa/remote_layer_api.h"
#include "base/command_line.h"
+#include "base/mac/mac_util.h"
#include "ui/base/ui_base_switches.h"
#include <objc/runtime.h>
@@ -12,10 +13,14 @@
namespace ui {
bool RemoteLayerAPISupported() {
- bool enabled_at_command_line =
+ // This API only works on Mac OS 10.9 and later.
+ if (!base::mac::IsOSMavericksOrLater())
+ return false;
+
+ bool disabled_at_command_line =
CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableRemoteCoreAnimation);
- if (!enabled_at_command_line)
+ switches::kDisableRemoteCoreAnimation);
+ if (disabled_at_command_line)
return false;
// Verify the GPU process interfaces are present.
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | ui/base/ui_base_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698