bug 751678: Low-res screenshot happens when Fennec is in the background r=mfinkle a=blocking-fennec
authorBrad Lassey <blassey@mozilla.com>
Fri, 04 May 2012 09:19:01 -0400
changeset 93151 def98285ad872035d49cfcea503d87cbe48e9e77
parent 93150 b94e64ad7e768d14479657ea083734cac420cb07
child 93152 32a8564667a5469168dd39230d635744720f0766
push id22611
push usereakhgari@mozilla.com
push dateFri, 04 May 2012 20:23:57 +0000
treeherdermozilla-central@dc93a3faa54e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, blocking-fennec
bugs751678
milestone15.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 751678: Low-res screenshot happens when Fennec is in the background r=mfinkle a=blocking-fennec
mobile/android/base/GeckoAppShell.java
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -2243,16 +2243,19 @@ public class GeckoAppShell
         sRepaintRunnable.addRectToRepaint(top, left, bottom, right);
     }
 
     private static int clamp(int min, int val, int max) {
         return Math.max(Math.min(max, val), min);
     }
 
     public static void screenshotWholePage(Tab tab) {
+        if (GeckoApp.mAppContext.isApplicationInBackground())
+            return;
+
         if (sMaxTextureSize == 0) {
             int[] maxTextureSize = new int[1];
             GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, maxTextureSize, 0);
             sMaxTextureSize = maxTextureSize[0];
             if (sMaxTextureSize == 0)
                 return;
         }
         ImmutableViewportMetrics viewport = GeckoApp.mAppContext.getLayerController().getViewportMetrics();