Bug 875441 - Don't keep reapplying the 2x scale in HiDPI mode when drawing the titlebar buttons. r=mattwoodrow

This commit is contained in:
Markus Stange 2013-05-24 08:12:27 +02:00
parent 3538b59ef1
commit 745b475aa5

View File

@ -2057,6 +2057,7 @@ nsChildView::UpdateTitlebarImageBuffer()
ClearRegion(mTitlebarImageBuffer, dirtyTitlebarRegion);
CGContextRef ctx = mTitlebarImageBuffer->GetCGContext();
CGContextSaveGState(ctx);
double scale = BackingScaleFactor();
CGContextScaleCTM(ctx, scale, scale);
@ -2113,6 +2114,7 @@ nsChildView::UpdateTitlebarImageBuffer()
DevPixelsToCocoaPoints(1));
[NSGraphicsContext setCurrentContext:oldContext];
CGContextRestoreGState(ctx);
mUpdatedTitlebarRegion.Or(mUpdatedTitlebarRegion, dirtyTitlebarRegion);
}