Repository: cordova-osx
Updated Branches:
  refs/heads/master ad3812b34 -> aa1384542


CB-11002 Enable hidden accelerated rendering settings by default


Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/aa138454
Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/aa138454
Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/aa138454

Branch: refs/heads/master
Commit: aa138454255d6d3e69edac450679713cfbccba7c
Parents: ad3812b
Author: Tobias Bocanegra <tri...@adobe.com>
Authored: Fri Apr 1 12:11:06 2016 -0700
Committer: Tobias Bocanegra <tri...@adobe.com>
Committed: Fri Apr 1 12:11:06 2016 -0700

----------------------------------------------------------------------
 .../CordovaLib/Classes/CDVViewController.h      | 22 ++++++++++++++++++++
 .../CordovaLib/Classes/CDVViewController.m      | 17 ++++++++++++---
 2 files changed, 36 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/aa138454/CordovaLib/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVViewController.h 
b/CordovaLib/CordovaLib/Classes/CDVViewController.h
index 3f1859e..01a22ec 100644
--- a/CordovaLib/CordovaLib/Classes/CDVViewController.h
+++ b/CordovaLib/CordovaLib/Classes/CDVViewController.h
@@ -87,4 +87,26 @@
 - (NSString*) _localStorageDatabasePath;
 
 - (void) _setLocalStorageDatabasePath:(NSString*) path;
+
+- (BOOL)requestAnimationFrameEnabled;
+- (void)setRequestAnimationFrameEnabled:(BOOL)enabled;
+
+- (BOOL)accelerated2dCanvasEnabled;
+- (void)setAccelerated2dCanvasEnabled:(BOOL)enabled;
+
+- (BOOL)acceleratedDrawingEnabled;
+- (void)setAcceleratedDrawingEnabled:(BOOL)enabled;
+
+- (BOOL)canvasUsesAcceleratedDrawing;
+- (void)setCanvasUsesAcceleratedDrawing:(BOOL)enabled;
+
+- (BOOL)acceleratedCompositingEnabled;
+- (void)setAcceleratedCompositingEnabled:(BOOL)enabled;
+
+- (BOOL)showDebugBorders;
+- (void)setShowDebugBorders:(BOOL)show;
+
+- (BOOL)showRepaintCounter;
+- (void)setShowRepaintCounter:(BOOL)show;
+
 @end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/aa138454/CordovaLib/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVViewController.m 
b/CordovaLib/CordovaLib/Classes/CDVViewController.m
index b4449cc..4631b9c 100644
--- a/CordovaLib/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/CordovaLib/Classes/CDVViewController.m
@@ -88,7 +88,7 @@
     WebPreferences* prefs = [self.webView preferences];
     [prefs setAutosaves:YES];
 
-    [self configureWebGL:prefs];
+    [self configureWebDefaults:prefs];
     [self configureLocalStorage:prefs];
     [self configureWindowSize];
     [self configureHideMousePointer];
@@ -166,9 +166,9 @@
 }
 
 /**
- * Configures WebGL
+ * Configures the default web preferences
  */
-- (void) configureWebGL:(WebPreferences*) prefs {
+- (void) configureWebDefaults:(WebPreferences*) prefs {
     // initialize items based on settings
     BOOL enableWebGL = [self.settings[@"EnableWebGL"] boolValue];
 
@@ -176,6 +176,17 @@
     if (enableWebGL) {
         [prefs setWebGLEnabled:YES];
     }
+
+    // ensure that acceleration settings are enabled (CB-11002)
+    [prefs setRequestAnimationFrameEnabled:YES];
+    [prefs setAccelerated2dCanvasEnabled:YES];
+    [prefs setAcceleratedDrawingEnabled:YES];
+    [prefs setCanvasUsesAcceleratedDrawing:YES];
+    [prefs setAcceleratedCompositingEnabled:YES];
+
+    // todo: add configuration options for those
+    // [prefs setShowRepaintCounter:YES];
+    // [prefs setShowDebugBorders:YES];
 }
 
 /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to