Bug 923542 - Draw to the correct destination rect when computing alpha masks. r=ajones
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 15 Oct 2013 14:55:15 +1300
changeset 164555 85901120533cf6722593c37b9386d7f6c336cab4
parent 164554 2140cb2f2fcd2ef1fa42346f6fdb1845cd470b40
child 164556 b3a7906130010476f88e2599f22d6233cf0ee1ad
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones
bugs923542
milestone27.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 923542 - Draw to the correct destination rect when computing alpha masks. r=ajones
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2262,17 +2262,17 @@ nsWindow::UpdateAlpha(gfxPattern* aPatte
                                            aBoundsRect.width);
       int32_t bufferSize = stride * aBoundsRect.height;
       nsAutoArrayPtr<uint8_t> imageBuffer(new (std::nothrow) uint8_t[bufferSize]);
       RefPtr<DrawTarget> drawTarget = gfxPlatform::GetPlatform()->
           CreateDrawTargetForData(imageBuffer, ToIntSize(aBoundsRect.Size()),
                                   stride, FORMAT_A8);
 
       if (drawTarget) {
-          drawTarget->FillRect(ToRect(aBoundsRect),
+          drawTarget->FillRect(Rect(0, 0, aBoundsRect.width, aBoundsRect.height),
                                *aPattern->GetPattern(drawTarget),
                                DrawOptions(1.0, OP_SOURCE));
       }
       UpdateTranslucentWindowAlphaInternal(aBoundsRect, imageBuffer, stride);
   } else {
       nsRefPtr<gfxImageSurface> img =
           new gfxImageSurface(ThebesIntSize(aBoundsRect.Size()),
                               gfxImageFormatA8);