Bug 1277647 - return the correct type from ANativeWindow_setBuffersGeometry; r=snorp
authorNathan Froyd <froydnj@gmail.com>
Fri, 03 Jun 2016 18:31:05 -0400
changeset 341474 b0139b57d0ccf65b95b7a3c60a693a0422c232dd
parent 341473 7f5e5e52d06fdb6c2b3ac864a310f934541ab8b9
child 341475 648a8ccff0394235e2a21b02824be6a87dd66210
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1277647
milestone49.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 1277647 - return the correct type from ANativeWindow_setBuffersGeometry; r=snorp This function returns a boolean, so let's return that, rather than relying on pointer-to-boolean coercion.
gfx/gl/AndroidNativeWindow.cpp
--- a/gfx/gl/AndroidNativeWindow.cpp
+++ b/gfx/gl/AndroidNativeWindow.cpp
@@ -57,17 +57,17 @@ public:
     }
 
     fANativeWindow_release(aWindow);
   }
 
   bool ANativeWindow_setBuffersGeometry(void* aWindow, int32_t aWidth, int32_t aHeight, int32_t aFormat) {
     ALOG("%s: window=%p, width=%d, height=%d, format=%d\n", __PRETTY_FUNCTION__, aWindow, aWidth, aHeight, aFormat);
     if (!Initialized()) {
-      return nullptr;
+      return false;
     }
 
     return fANativeWindow_setBuffersGeometry(aWindow, aWidth, aHeight, (int32_t)aFormat) == 0;
   }
 
   bool ANativeWindow_lock(void* aWindow, void* out_buffer, void*in_out_dirtyBounds) {
     ALOG("%s: window=%p, out_buffer=%p, in_out_dirtyBounds=%p\n", __PRETTY_FUNCTION__,
          aWindow, out_buffer, in_out_dirtyBounds);
@@ -273,9 +273,9 @@ AndroidNativeWindow::UnlockAndPost()
     return false;
   }
 
   return sLibrary->ANativeWindow_unlockAndPost(mWindow);
 }
 
 }
 
-#endif // MOZ_WIDGET_ANDROID
\ No newline at end of file
+#endif // MOZ_WIDGET_ANDROID