Bug 1006152 - Do not use ro.display.colorfill since JB r=Sushil
authorSotaro Ikeda <sikeda@mozilla.com>
Fri, 09 May 2014 12:03:53 -0700
changeset 182556 f49f0bcf49daad56e9bdce64266faf115fed14d5
parent 182555 ac8c0afea2c9900192d52e13b60529440ec9bb6d
child 182557 e7c2733049012c3962860b5960d65cebaa683b98
push id26765
push usercbook@mozilla.com
push dateMon, 12 May 2014 11:40:59 +0000
treeherdermozilla-central@3bb70c0d6845 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersSushil
bugs1006152
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1006152 - Do not use ro.display.colorfill since JB r=Sushil
b2g/chrome/content/settings.js
widget/gonk/nsWindow.cpp
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js
@@ -557,17 +557,22 @@ setUpdateTrackingId();
   var req = navigator.mozSettings.createLock().get('layers.composer2d.enabled');
   req.onsuccess = function() {
     if (typeof(req.result['layers.composer2d.enabled']) === 'undefined') {
       var enabled = false;
       if (Services.prefs.getPrefType('layers.composer2d.enabled') == Ci.nsIPrefBranch.PREF_BOOL) {
         enabled = Services.prefs.getBoolPref('layers.composer2d.enabled');
       } else {
 #ifdef MOZ_WIDGET_GONK
-        enabled = (libcutils.property_get('ro.display.colorfill') === '1');
+        let androidVersion = libcutils.property_get("ro.build.version.sdk");
+        if (androidVersion >= 17 ) {
+          enabled = true;
+        } else {
+          enabled = (libcutils.property_get('ro.display.colorfill') === '1');
+        }
 #endif
       }
       navigator.mozSettings.createLock().set({'layers.composer2d.enabled': enabled });
     }
 
     SettingsListener.observe("layers.composer2d.enabled", true, function(value) {
       Services.prefs.setBoolPref("layers.composer2d.enabled", value);
     });
--- a/widget/gonk/nsWindow.cpp
+++ b/widget/gonk/nsWindow.cpp
@@ -156,18 +156,16 @@ nsWindow::nsWindow()
         // resources, if we're going to use omtc.
         //
         // NB: GetPlatform() will create the gfxPlatform, which wants
         // to know the color depth, which asks our native window.
         // This has to happen after other init has finished.
         gfxPlatform::GetPlatform();
         sUsingOMTC = ShouldUseOffMainThreadCompositing();
 
-        property_get("ro.display.colorfill", propValue, "0");
-
         //Update sUsingHwc whenever layers.composer2d.enabled changes
         Preferences::AddBoolVarCache(&sUsingHwc, "layers.composer2d.enabled");
 
         if (sUsingOMTC) {
           sOMTCSurface = new gfxImageSurface(gfxIntSize(1, 1),
                                              gfxImageFormat::RGB24);
         }
     }