Bug 1032880 - Disable 'transparent content with displayports' warning in tests. r=tn

--HG--
extra : rebase_source : 21ea67d322cb4a780b67584be4047f6ca8ac6690
This commit is contained in:
Botond Ballo 2014-07-22 17:01:50 -04:00
Родитель da3e70cc4f
Коммит a7f4a6dd87
3 изменённых файлов: 27 добавлений и 1 удалений

Просмотреть файл

@ -65,6 +65,20 @@ using namespace mozilla::dom;
using namespace mozilla::layout;
typedef FrameMetrics::ViewID ViewID;
static bool
SpammyLayoutWarningsEnabled()
{
static bool sValue = false;
static bool sValueInitialized = false;
if (!sValueInitialized) {
Preferences::GetBool("layout.spammy_warnings.enabled", &sValue);
sValueInitialized = true;
}
return sValue;
}
static inline nsIFrame*
GetTransformRootFrame(nsIFrame* aFrame)
{
@ -1267,11 +1281,17 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
aBuilder->FindReferenceFrameFor(aForFrame),
root, viewport,
!isRoot, isRoot, containerParameters);
// NS_WARNING is debug-only, so don't even bother checking the conditions in
// a release build.
#ifdef DEBUG
if (usingDisplayport &&
!(root->GetContentFlags() & Layer::CONTENT_OPAQUE)) {
!(root->GetContentFlags() & Layer::CONTENT_OPAQUE) &&
SpammyLayoutWarningsEnabled()) {
// See bug 693938, attachment 567017
NS_WARNING("Transparent content with displayports can be expensive.");
}
#endif
layerManager->SetRoot(root);
layerBuilder->WillEndTransaction();

Просмотреть файл

@ -2046,6 +2046,9 @@ pref("layout.display-list.dump", false);
// heavily loaded.
pref("layout.frame_rate.precise", false);
// pref to control whether layout warnings that are hit quite often are enabled
pref("layout.spammy_warnings.enabled", true);
// Is support for the Web Animations API enabled?
#ifdef RELEASE_BUILD
pref("dom.animations-api.core.enabled", false);

Просмотреть файл

@ -139,6 +139,9 @@ user_pref("layout.css.grid.enabled", true);
// Enable CSS Ruby for testing
user_pref("layout.css.ruby.enabled", true);
// Disable spammy layout warnings because they pollute test logs
user_pref("layout.spammy_warnings.enabled", false);
// Enable mozContacts
user_pref("dom.mozContacts.enabled", true);
user_pref("dom.navigator-property.disable.mozContacts", false);