Bug 945655 - Make transparent flood filters report an empty output rect. r=roc, a=lsblakk
authorMarkus Stange <mstange@themasta.com>
Tue, 10 Dec 2013 14:50:41 +0100
changeset 175485 4321400b4a7cf2307d0650f2d4c49ded2f776947
parent 175484 462fcf3088631bf50c7f4d50b3e8420188ab09e2
child 175486 96bd2d5ba2e236df319596c12232c15df05ab07a
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lsblakk
bugs945655
milestone28.0a2
Bug 945655 - Make transparent flood filters report an empty output rect. r=roc, a=lsblakk
gfx/2d/FilterNodeSoftware.cpp
--- a/gfx/2d/FilterNodeSoftware.cpp
+++ b/gfx/2d/FilterNodeSoftware.cpp
@@ -1333,16 +1333,19 @@ TemporaryRef<DataSourceSurface>
 FilterNodeFloodSoftware::GetOutput(const IntRect& aRect)
 {
   return Render(aRect);
 }
 
 IntRect
 FilterNodeFloodSoftware::GetOutputRectInRect(const IntRect& aRect)
 {
+  if (mColor.a == 0.0f) {
+    return IntRect();
+  }
   return aRect;
 }
 
 int32_t
 FilterNodeTileSoftware::InputIndex(uint32_t aInputEnumIndex)
 {
   switch (aInputEnumIndex) {
     case IN_TILE_IN: return 0;