Bug 963550 - Warn about OpenGL non-support only once during execution instead of spamming the log. r=bjacob
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 27 Jan 2014 15:40:50 -0500
changeset 181440 6017d123b9da8d62d34ad25cd94a81f214ae60e4
parent 181439 363517e27efdc89d933ce8b2b5a4426a0e9dbfc4
child 181441 499a39c0e2ada40d1525c7c4db9f0fcf05c189fe
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs963550
milestone29.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 963550 - Warn about OpenGL non-support only once during execution instead of spamming the log. r=bjacob
widget/xpwidgets/nsBaseWidget.cpp
--- a/widget/xpwidgets/nsBaseWidget.cpp
+++ b/widget/xpwidgets/nsBaseWidget.cpp
@@ -890,17 +890,21 @@ nsBaseWidget::ComputeShouldAccelerate(bo
 
   if (disableAcceleration || safeMode)
     return false;
 
   if (mForceLayersAcceleration)
     return true;
 
   if (!whitelisted) {
-    NS_WARNING("OpenGL-accelerated layers are not supported on this system");
+    static int tell_me_once = 0;
+    if (!tell_me_once) {
+      NS_WARNING("OpenGL-accelerated layers are not supported on this system");
+      tell_me_once = 1;
+    }
 #ifdef MOZ_ANDROID_OMTC
     NS_RUNTIMEABORT("OpenGL-accelerated layers are a hard requirement on this platform. "
                     "Cannot continue without support for them");
 #endif
     return false;
   }
 
   if (accelerateByDefault)