Bug 1726923 - Remove asserts on valid viewport values again, r=gfx-reviewers,lsalzman
authorRobert Mader <robert.mader@posteo.de>
Tue, 31 Aug 2021 18:27:01 +0000
changeset 590371 b2c5ed1aea75d8206e0aea3deddc4f8507b3d3be
parent 590370 8752551766570968812880e167ecfa60be030b02
child 590372 16257b87758e942b6ec0651e58ca4589ee876815
push id148908
push userrobert.mader@posteo.de
push dateTue, 31 Aug 2021 18:52:19 +0000
treeherderautoland@b2c5ed1aea75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfx-reviewers, lsalzman
bugs1726923
milestone93.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 1726923 - Remove asserts on valid viewport values again, r=gfx-reviewers,lsalzman This reverts D123286 as we now have a generic way to trigger crash reports on Wayland protocol errors. Depends on D123894 Differential Revision: https://phabricator.services.mozilla.com/D123897
gfx/layers/NativeLayerWayland.cpp
--- a/gfx/layers/NativeLayerWayland.cpp
+++ b/gfx/layers/NativeLayerWayland.cpp
@@ -680,41 +680,32 @@ void NativeLayerWayland::SetSubsurfacePo
 void NativeLayerWayland::SetViewportSourceRect(const Rect aSourceRect) {
   MutexAutoLock lock(mMutex);
 
   if (aSourceRect == mViewportSourceRect) {
     return;
   }
 
   mViewportSourceRect = aSourceRect;
-  MOZ_RELEASE_ASSERT(
-      (mViewportSourceRect.x >= 0 && mViewportSourceRect.y >= 0 &&
-       mViewportSourceRect.width > 0 && mViewportSourceRect.height > 0) ||
-      (mViewportSourceRect.x == -1 && mViewportSourceRect.y == -1 &&
-       mViewportSourceRect.width == -1 && mViewportSourceRect.height == -1));
   wp_viewport_set_source(mViewport, wl_fixed_from_double(mViewportSourceRect.x),
                          wl_fixed_from_double(mViewportSourceRect.y),
                          wl_fixed_from_double(mViewportSourceRect.width),
                          wl_fixed_from_double(mViewportSourceRect.height));
 }
 
 void NativeLayerWayland::SetViewportDestinationSize(int aWidth, int aHeight) {
   MutexAutoLock lock(mMutex);
 
   if (aWidth == mViewportDestinationSize.width &&
       aHeight == mViewportDestinationSize.height) {
     return;
   }
 
   mViewportDestinationSize.width = aWidth;
   mViewportDestinationSize.height = aHeight;
-  MOZ_RELEASE_ASSERT((mViewportDestinationSize.width > 0 &&
-                      mViewportDestinationSize.height > 0) ||
-                     (mViewportDestinationSize.width == -1 &&
-                      mViewportDestinationSize.height == -1));
   wp_viewport_set_destination(mViewport, mViewportDestinationSize.width,
                               mViewportDestinationSize.height);
 }
 
 void NativeLayerWayland::RequestFrameCallback(
     const RefPtr<CallbackMultiplexHelper>& aMultiplexHelper) {
   MutexAutoLock lock(mMutex);
   MOZ_ASSERT(aMultiplexHelper->IsActive());