Bug 866027 - Recreate window corner mask when window resolution changes. r=bgirard
authorMarkus Stange <mstange@themasta.com>
Fri, 07 Jun 2013 11:50:25 +0200
changeset 145847 cebcec9ca3c3dbd57fe037e1564b2218139d12e3
parent 145846 2464333908a77726cfd3b21aa22941584091fcfe
child 145848 728ac315adcb9fe6cb6070e1f796952f10605429
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgirard
bugs866027
milestone24.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 866027 - Recreate window corner mask when window resolution changes. r=bgirard
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2225,17 +2225,18 @@ void
 nsChildView::MaybeDrawRoundedCorners(GLManager* aManager, const nsIntRect& aRect)
 {
   MutexAutoLock lock(mEffectsLock);
   
   if (mFailedCornerMaskImage) {
     return;
   }
 
-  if (!mCornerMaskImage) {
+  if (!mCornerMaskImage ||
+      mCornerMaskImage->GetSize().width != mDevPixelCornerRadius) {
     mCornerMaskImage =
       aManager->gl()->CreateTextureImage(nsIntSize(mDevPixelCornerRadius,
                                                    mDevPixelCornerRadius),
                                          gfxASurface::CONTENT_COLOR_ALPHA,
                                          LOCAL_GL_CLAMP_TO_EDGE,
                                          TextureImage::UseNearestFilter);
 
     // Creation of texture images can fail.