Bug 1256576 - Make sure texture is (re)initialized if the size changed. r=snorp, a=lizzard
authorJonathan Kew <jkew@mozilla.com>
Wed, 23 Mar 2016 14:38:31 +0000
changeset 325529 9bea3ad9b32f767d7d4ee2edf53a95da7424f61c
parent 325528 0eb133efdeeb479a959df87061978a3dc1da83a3
child 325530 5f567a7cba864efa075b7cbd3698b93b97b170d7
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, lizzard
bugs1256576
milestone47.0a2
Bug 1256576 - Make sure texture is (re)initialized if the size changed. r=snorp, a=lizzard
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2967,16 +2967,17 @@ void
 RectTextureImage::EndUpdate(bool aKeepSurface)
 {
   MOZ_ASSERT(mInUpdate, "Ending update while not in update");
 
   bool needInit = !mTexture;
   LayoutDeviceIntRegion updateRegion = mUpdateRegion;
   if (mTextureSize != mBufferSize) {
     mTextureSize = mBufferSize;
+    needInit = true;
   }
 
   if (needInit || !CanUploadSubtextures()) {
     updateRegion =
       LayoutDeviceIntRect(LayoutDeviceIntPoint(0, 0), mTextureSize);
   }
 
   gfx::IntPoint srcPoint = updateRegion.GetBounds().TopLeft().ToUnknownPoint();