Bug 1262338 (Part 3) - When RemoveFrameRectFilter is finished, mRow should be at mFrameRect.YMost(). r=njn a=abillings
authorSeth Fowler <mark.seth.fowler@gmail.com>
Wed, 25 May 2016 22:48:29 -0700
changeset 333048 b487c31f112be41241912d780ca762218b3e663a
parent 333047 ca85cebb809dde03109b92b670a3d34907a24ae4
child 333049 9cbc4f2d34a30255c3a093f6005f87b453491a7a
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn, abillings
bugs1262338
milestone48.0a2
Bug 1262338 (Part 3) - When RemoveFrameRectFilter is finished, mRow should be at mFrameRect.YMost(). r=njn a=abillings
image/SurfaceFilters.h
--- a/image/SurfaceFilters.h
+++ b/image/SurfaceFilters.h
@@ -413,17 +413,17 @@ public:
     return mNext.TakeInvalidRect();
   }
 
 protected:
   uint8_t* DoResetToFirstRow() override
   {
     uint8_t* rowPtr = mNext.ResetToFirstRow();
     if (rowPtr == nullptr) {
-      mRow = InputSize().height;
+      mRow = mFrameRect.YMost();
       return nullptr;
     }
 
     mRow = mUnclampedFrameRect.y;
 
     // Advance the next pipeline stage to the beginning of the frame rect,
     // outputting blank rows.
     if (mFrameRect.y > 0) {
@@ -450,17 +450,17 @@ protected:
     // We've finished the region specified by the frame rect, but the frame rect
     // is empty, so we need to output the rest of the image immediately. Advance
     // to the end of the next pipeline stage's buffer, outputting blank rows.
     mNext.template WriteRows<uint32_t>([](uint32_t* aRow, uint32_t aLength) {
       memset(aRow, 0, aLength * sizeof(uint32_t));
       return Nothing();
     });
 
-    mRow = InputSize().height;
+    mRow = mFrameRect.YMost();
     return nullptr;  // We're done.
   }
 
   uint8_t* DoAdvanceRow() override
   {
     uint8_t* rowPtr = nullptr;
 
     const int32_t currentRow = mRow;
@@ -515,17 +515,17 @@ protected:
 
     // We've finished the region specified by the frame rect. Advance to the end
     // of the next pipeline stage's buffer, outputting blank rows.
     mNext.template WriteRows<uint32_t>([](uint32_t* aRow, uint32_t aLength) {
       memset(aRow, 0, aLength * sizeof(uint32_t));
       return Nothing();
     });
 
-    mRow = InputSize().height;
+    mRow = mFrameRect.YMost();
     return nullptr;  // We're done.
   }
 
 private:
   uint8_t* AdjustRowPointer(uint8_t* aNextRowPointer) const
   {
     if (mBuffer) {
       MOZ_ASSERT(aNextRowPointer == mBuffer.get());