Bug 995145 - Don't erase pixels from the window top when drawing the highlight line. r=smichaud, a=sledru
authorMarkus Stange <mstange@themasta.com>
Tue, 01 Jul 2014 18:32:28 +0200
changeset 208170 4767a3451d00
parent 208169 5a6749df6a78
child 208171 d8e7408cb510
push id3753
push userryanvm@gmail.com
push date2014-07-28 14:29 +0000
treeherdermozilla-beta@ecfc5bee1685 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, sledru
bugs995145
milestone32.0
Bug 995145 - Don't erase pixels from the window top when drawing the highlight line. r=smichaud, a=sledru
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2331,17 +2331,17 @@ DrawTitlebarHighlight(NSSize aWindowSize
   [path addClip];
 
   // Now we fill the path with a subtle highlight gradient.
   // We don't use NSGradient because it's 5x to 15x slower than the manual fill,
   // as indicated by the performance test in bug 880620.
   for (CGFloat y = 0; y < aRadius; y += aDevicePixelWidth) {
     CGFloat t = y / aRadius;
     [[NSColor colorWithDeviceWhite:1.0 alpha:0.4 * (1.0 - t)] set];
-    NSRectFill(NSMakeRect(0, y, aWindowSize.width, aDevicePixelWidth));
+    NSRectFillUsingOperation(NSMakeRect(0, y, aWindowSize.width, aDevicePixelWidth), NSCompositeSourceOver);
   }
 
   [NSGraphicsContext restoreGraphicsState];
 }
 
 static CGContextRef
 CreateCGContext(const nsIntSize& aSize)
 {