Bug 939962 = Set pref to enable willReadFrequently software canvas option. r=snorp, a=koi+
authorDavid Flanagan <dflanagan@mozilla.com>
Mon, 06 Jan 2014 14:13:57 -0800
changeset 175586 55197a1aa5af760a44d6d3be2d2778c4a572108c
parent 175585 7863c4ddd4091fd5c166ff543b88358c460a9c37
child 175587 6233d1456824c7cec1a8df5eff8e3150377c8752
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, koi
bugs939962
milestone28.0a2
Bug 939962 = Set pref to enable willReadFrequently software canvas option. r=snorp, a=koi+
b2g/app/b2g.js
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -850,8 +850,18 @@ pref("osfile.reset_worker_delay", 5000);
 // The URL of the Firefox Accounts auth server backend
 pref("identity.fxaccounts.auth.uri", "https://api-accounts.dev.lcip.org/v1");
 
 // APZC preferences.
 //
 // Gaia relies heavily on scroll events for now, so lets fire them
 // more often than the default value (100).
 pref("apz.asyncscroll.throttle", 40);
+
+// This preference allows FirefoxOS apps (and content, I think) to force
+// the use of software (instead of hardware accelerated) 2D canvases by
+// creating a context like this:
+//
+//   canvas.getContext('2d', { willReadFrequently: true })
+//
+// Using a software canvas can save memory when JS calls getImageData()
+// on the canvas frequently. See bug 884226.
+pref("gfx.canvas.willReadFrequently.enable", true);