Bug 799768: Only bother computing an invalid rect if it affects composition and enable omtc for X11 b2g builds. r=mattwoodrow
authorChris Jones <jones.chris.g@gmail.com>
Thu, 11 Oct 2012 16:55:42 -0700
changeset 113757 b3cd0b7de62760a4f5eda25198fb3cd9d9e6aa1e
parent 113756 9d5bb3935ef96266fee92ab29bde0a6f688a1956
child 113758 a670db3bb81628db11c57054d901b4ed29743f07
push id23888
push useremorley@mozilla.com
push dateTue, 20 Nov 2012 14:54:23 +0000
treeherdermozilla-central@a9d59073400b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs799768
milestone20.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 799768: Only bother computing an invalid rect if it affects composition and enable omtc for X11 b2g builds. r=mattwoodrow
b2g/app/nsBrowserApp.cpp
layout/base/nsDisplayList.cpp
--- a/b2g/app/nsBrowserApp.cpp
+++ b/b2g/app/nsBrowserApp.cpp
@@ -153,16 +153,20 @@ static int do_main(int argc, char* argv[
 
   return XRE_main(argc, argv, &sAppData, 0);
 }
 
 int main(int argc, char* argv[])
 {
   char exePath[MAXPATHLEN];
 
+#if defined(MOZ_X11)
+  putenv("MOZ_USE_OMTC=1");
+#endif
+
   nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
   if (NS_FAILED(rv)) {
     Output("Couldn't calculate the application directory.\n");
     return 255;
   }
 
   char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
   if (!lastSlash || ((lastSlash - exePath) + sizeof(XPCOM_DLL) + 1 > MAXPATHLEN))
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1056,17 +1056,17 @@ void nsDisplayList::PaintForFrame(nsDisp
   }
 
   nsPresContext* presContext = aForFrame->PresContext();
   nsIPresShell* presShell = presContext->GetPresShell();
 
   NotifySubDocInvalidationFunc computeInvalidFunc =
     presContext->MayHavePaintEventListenerInSubDocument() ? nsPresContext::NotifySubDocInvalidation : 0;
   bool computeInvalidRect = (computeInvalidFunc ||
-                             (layerManager->GetBackendType() == LAYERS_BASIC)) &&
+                             !layerManager->IsCompositingCheap()) &&
                             widgetTransaction;
 
   nsAutoPtr<LayerProperties> props(computeInvalidRect ? 
                                      LayerProperties::CloneFrom(layerManager->GetRoot()) : 
                                      nullptr);
 
   nsDisplayItem::ContainerParameters containerParameters
     (presShell->GetXResolution(), presShell->GetYResolution());