Bug 1256576 - Make sure texture is (re)initialized if the size changed. r=snorp
authorJonathan Kew <jkew@mozilla.com>
Wed, 23 Mar 2016 14:38:31 +0000
changeset 290057 e2914c063e387723b45f31b5b81bb8c6ba49b1b1
parent 290056 bef0b9911c0b802e8bad189728bc3ef8620e8d40
child 290058 f57f85dc94e4fad0f348d35c176a5b63b972bd65
push id30114
push usercbook@mozilla.com
push dateThu, 24 Mar 2016 15:15:54 +0000
treeherdermozilla-central@24c5fbde4488 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1256576
milestone48.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 1256576 - Make sure texture is (re)initialized if the size changed. r=snorp
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2941,16 +2941,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();