Bug 1603577 [Linux] Remove logging from ApplySizeConstraints/UpdateOpaqueRegion, r=jhorak
authorMartin Stransky <stransky@redhat.com>
Fri, 13 Dec 2019 07:49:16 +0000
changeset 506858 e0f4d9fd669d3bbc11c35cf49ad4089d53cdca2e
parent 506857 b0d4fec975e29a402fe50b05528ca89fa9f60b49
child 506859 a96a38c0b28f9db0359ab77e20fdb6147ca12945
push id103122
push usernbeleuzu@mozilla.com
push dateFri, 13 Dec 2019 08:48:04 +0000
treeherderautoland@e0f4d9fd669d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhorak
bugs1603577
milestone73.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 1603577 [Linux] Remove logging from ApplySizeConstraints/UpdateOpaqueRegion, r=jhorak Differential Revision: https://phabricator.services.mozilla.com/D56999
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -985,45 +985,37 @@ void nsWindow::SetSizeConstraints(const 
 
   mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize);
   mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize);
 
   ApplySizeConstraints();
 }
 
 void nsWindow::ApplySizeConstraints(void) {
-  LOG(("nsWindow::ApplySizeConstraints [%p]\n", (void*)this));
-
   if (mShell) {
     GdkGeometry geometry;
     geometry.min_width =
         DevicePixelsToGdkCoordRoundUp(mSizeConstraints.mMinSize.width);
     geometry.min_height =
         DevicePixelsToGdkCoordRoundUp(mSizeConstraints.mMinSize.height);
     geometry.max_width =
         DevicePixelsToGdkCoordRoundDown(mSizeConstraints.mMaxSize.width);
     geometry.max_height =
         DevicePixelsToGdkCoordRoundDown(mSizeConstraints.mMaxSize.height);
 
-    LOG(("    min width %d min height %d\n", geometry.min_width,
-         geometry.min_height));
-    LOG(("    max width %d max height %d\n", geometry.max_width,
-         geometry.max_height));
-
     uint32_t hints = 0;
     if (mSizeConstraints.mMinSize != LayoutDeviceIntSize(0, 0)) {
       hints |= GDK_HINT_MIN_SIZE;
     }
     if (mSizeConstraints.mMaxSize !=
         LayoutDeviceIntSize(NS_MAXSIZE, NS_MAXSIZE)) {
       hints |= GDK_HINT_MAX_SIZE;
     }
 
     if (mAspectRatio != 0.0f) {
-      LOG(("    aspect %f\n", mAspectRatio));
       geometry.min_aspect = mAspectRatio;
       geometry.max_aspect = mAspectRatio;
       hints |= GDK_HINT_ASPECT;
     }
 
     gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, &geometry,
                                   GdkWindowHints(hints));
   }
@@ -4793,30 +4785,26 @@ void nsWindow::UpdateOpaqueRegionGtk(cai
                           ? gtk_widget_get_window(mShell)
                           : mGdkWindow;
   if (gdk_window_get_window_type(window) == GDK_WINDOW_TOPLEVEL) {
     (*sGdkWindowSetOpaqueRegion)(window, aRegion);
   }
 }
 
 void nsWindow::UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion) {
-  LOG(("nsWindow::UpdateOpaqueRegion [%p]\n", (void*)this));
-
   // Also don't set shape mask if we use transparency bitmap.
   if (mTransparencyBitmapForTitlebar) {
-    LOG(("    disabled due to transparency bitmap\n"));
     return;
   }
 
   cairo_region_t* region = nullptr;
 
   // We don't tweak opaque regions for non-toplevel windows (popup, panels etc.)
   // as they can be transparent by gecko.
   if (mWindowType != eWindowType_toplevel) {
-    LOG(("    setting for non-toplevel window\n"));
     if (!aOpaqueRegion.IsEmpty()) {
       region = cairo_region_create();
       for (auto iter = aOpaqueRegion.RectIter(); !iter.Done(); iter.Next()) {
         const LayoutDeviceIntRect& r = iter.Get();
         cairo_rectangle_int_t rect = {r.x, r.y, r.width, r.height};
         cairo_region_union_rectangle(region, &rect);
       }
     }
@@ -4836,25 +4824,21 @@ void nsWindow::UpdateOpaqueRegion(const 
     int scale = GdkScaleFactor();
     int width = mBounds.width / scale;
     int height = mBounds.height / scale;
 
     cairo_rectangle_int_t rect = {decorationSize.left, decorationSize.top,
                                   width, height};
     cairo_region_union_rectangle(region, &rect);
 
-    LOG(("    setting for toplevel window %d,%d -> %d x %d\n", rect.x, rect.y,
-         rect.width, rect.height));
-
     // Subtract transparent corners which are used by
     // various Gtk themes for toplevel windows when titlebar
     // is rendered by gecko.
     if (mDrawInTitlebar && !mIsPIPWindow && mSizeState == nsSizeMode_Normal &&
         !mIsTiled) {
-      LOG(("    substracted corners for titlebar decoration\n"));
       cairo_rectangle_int_t rect = {decorationSize.left, decorationSize.top,
                                     TITLEBAR_SHAPE_MASK_HEIGHT,
                                     TITLEBAR_SHAPE_MASK_HEIGHT};
       cairo_region_subtract_rectangle(region, &rect);
       rect = {
           decorationSize.left + width - TITLEBAR_SHAPE_MASK_HEIGHT,
           decorationSize.top,
           TITLEBAR_SHAPE_MASK_HEIGHT,